open-company / open-company-web

OpenCompany Web Application - Carrot web UI
https://github.com/open-company
Other
61 stars 9 forks source link

Fix Sentry browser #1143

Closed bago2k4 closed 4 years ago

bago2k4 commented 4 years ago

NB: this is urgent only because right now in Sentry we get only the errors and the stack traces, no info about OS, browser and deploy release version.

Review with:

Sometimes Sentry doesn't add the OS and browser info. Also oc.web.lib.sentry/capture-error-with-context! and oc.web.lib.sentry/capture-error-with-message are broken since they don't catch the error they create, so we get a report but w/o all the needed details and also it's not handled.

To test:

belucid commented 4 years ago

@bago2k4 I don't get anything in Sentry on staging after oc.web.lib.sentry.capture_error_with_message("My first error", "My error message");

bago2k4 commented 4 years ago

@belucid good catch. I fixed it.

belucid commented 4 years ago

@bago2k4 I still don't get anything in Sentry on staging after oc.web.lib.sentry.capture_error_with_message("My first error", "My error message");

bago2k4 commented 4 years ago

@belucid now it should work. I had to add a PR for infra since we were limiting the errors to those that happen on scripts loaded under staging.carrot.io but our js code is loaded form the CDN.

You can find the link in the description

belucid commented 4 years ago

@bago2k4 I get a Sentry Logger [Error]: Error while sending event: [object Response] when running oc.web.lib.sentry.capture_error_with_message("My first error", "My error message"); on staging now.

bago2k4 commented 4 years ago

@belucid fixed as per the discussion on Slack