Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not return error id if we know we did not send the error #667

Merged
merged 3 commits into from
Oct 12, 2018

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Oct 6, 2018

If we know we did not sent the error to a Sentry server we should not return the error id which could like like it would have been sent.

This makes it easier to debug and easier to show an error id (or not in this case) to users or error pages. If no error was sent we should not have an ID set.

This ofcourse cannot be done when errors are stored for bulk sending.

For example: In Laravel we check if the event id is not null before showing it to the user on the 500 screen, better not show it if we are not sending it to not get error id's from users that are never sent.

@stayallive stayallive force-pushed the do-not-set-errorid-when-not-sending branch from 3ea310e to efeda8a Compare October 6, 2018 13:10
@stayallive stayallive changed the title [WIP] Do not return error id if we know we did not send the error Do not return error id if we know we did not send the error Oct 6, 2018
@stayallive stayallive requested a review from Jean85 October 6, 2018 13:29
Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change makes sense 👍

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change makes sense. Do we have the same issue under 2.0?

@stayallive
Copy link
Collaborator Author

@Jean85 yes, I will make a PR for that now :).

@stayallive stayallive merged commit 38c06ce into master Oct 12, 2018
@stayallive stayallive deleted the do-not-set-errorid-when-not-sending branch October 12, 2018 10:19
@ste93cry
Copy link
Collaborator

It does not make sense to make a PR now with the upcoming changes of the unified API as most of the code will need to be refactored or moved around

@stayallive
Copy link
Collaborator Author

Doesn't matter, it's there to keep track of it. Merged or not we are going to need to take a look at it again (or not). Better to have it than not.

@Jean85
Copy link
Collaborator

Jean85 commented Oct 12, 2018

It would make sense only if a test is added, that wouldn't need to be changed much.
Otherwise, IMHO an issue is better.

@Jean85
Copy link
Collaborator

Jean85 commented Oct 12, 2018

BTW @stayallive already did it in #671

@ste93cry
Copy link
Collaborator

As far as I saw in the unified API a bool is not enough. Instead in the Javascript SDK they return the status which is an enum of values

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

Successfully merging this pull request may close these issues.

4 participants