-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat][TRIP-10326] Add sentry captureMessage to Google calendar services #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you have the error
object at hand maybe just use Sentry.captureException(error)
?
@haffla I thought about that, but adding an extra string gives us a nicer visualization in the sentry report when it arrives in the slack channel. The error object is also available in the Sentry report page. But if you don't like it I can also remove the extra string part |
The visualization was actually my concern. This will result in quite long strings and I am not sure what "....: ${error}" will return. I think Sentry displays errors in a good way. |
@@ -286,6 +289,8 @@ export default class GoogleCalendarService implements Calendar { | |||
* 410 is when an event is already deleted on the Google cal before on cal.com | |||
* 404 is when the event is on a different calendar | |||
*/ | |||
Sentry.captureException(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we actually don't want to always report the error. Only if the error code is not equal to 404 and not equal to 410. Only when this code returns a rejected promise, should we report the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
Context/Change
https://tourlane.atlassian.net/browse/TRIP-10326