Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Sharing errors #13

Open
AdrianMrn opened this issue Feb 6, 2020 · 4 comments
Open

Sharing errors #13

AdrianMrn opened this issue Feb 6, 2020 · 4 comments
Assignees

Comments

@AdrianMrn
Copy link
Collaborator

AdrianMrn commented Feb 6, 2020

In ignition for PHP, I believe this is done through the package, so we'll have to find a viable alternative for this. I don't think this will be too difficult to accomplish in JS.

@AdrianMrn AdrianMrn added the enhancement New feature or request label Feb 6, 2020
@AdrianMrn
Copy link
Collaborator Author

@mpociot I'd like to add the share functionality to ignition-js, but I'm not sure what endpoint to send the reports to.

In php ignition, I think this happens here, but I'm not sure where the actual sending is happening, or what endpoint is being used: https://github.com/facade/ignition/blob/2c7097f942a083bc131c7dd526dd55134532ca71/src/Http/Controllers/ShareReportController.php#L12

Any ideas?

@mpociot
Copy link

mpociot commented Feb 11, 2020

@AdrianMrn it happens in here: https://github.com/facade/ignition/blob/master/src/Actions/ShareReportAction.php#L32-L36

So you send the report object, the selected tabs and line selection to the public-reports endpoint

@AdrianMrn
Copy link
Collaborator Author

Awesome :) that shouldn't be too difficult

@AdrianMrn AdrianMrn assigned AdrianMrn and unassigned mpociot Feb 11, 2020
@AdrianMrn AdrianMrn added launch checklist and removed enhancement New feature or request labels Feb 11, 2020
@AdrianMrn
Copy link
Collaborator Author

AdrianMrn commented Feb 11, 2020

@mpociot Do you have any idea why the report needs to be stringified when sharing? I can't seem to find anything in the Ignition codebase that really depends on it except for this:
https://github.com/facade/ignition/blob/2c7097f942a083bc131c7dd526dd55134532ca71/src/Http/Controllers/ShareReportController.php#L14

It seems to "just work" if I send the report as an object and remove the json_decode.

We're stringifying it here:
https://github.com/facade/ignition-ui/blob/e68801212cf25e2e6c89222556a28f840d2d88b7/src/js/components/Shared/ShareButton.vue#L94

Do you think I can change it to be sent normally instead? The public-reports endpoint in Flare expects it not-stringified, and I'd rather not have to add in any hacks to change the behaviour of the report button for js errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants