openverse-frontend icon indicating copy to clipboard operation
openverse-frontend copied to clipboard

Fix media fetching error handling to actually capture issue description

Open sarayourfriend opened this issue 3 years ago • 2 comments

Sentry link

https://sentry.io/share/issue/0e9ffd2ec1144d8e8b504db32e4e6c25/

Description

https://github.com/WordPress/openverse-frontend/blob/96b061f411fbc73ae55980e2b6f9ecd358931762/src/stores/media/index.ts#L388

If we don't know how to handle an error, we should not just swallow it completely and mask it with a vague string unless we're also capturing the error in Sentry. Update the above code to call this.$sentry.captureException(error) in the case where we don't know how to correctly handle the error. Do this with the original exception, not with the vague/useless for debugging error message we set here.

Marking as high because this prevents us from debugging actual issues in this part of the code.

sarayourfriend avatar Aug 01 '22 16:08 sarayourfriend

While we're at it, it's probably not a bad idea to audit our error handling across the app and create subsequent issues to better capture exceptions and not swallow error messages when we don't know how to handle errors.

sarayourfriend avatar Aug 01 '22 16:08 sarayourfriend

I would be interested in resolving this bug.

ramadanomar avatar Aug 16 '22 15:08 ramadanomar

Closed by #1707. Thanks @ramadanomar

sarayourfriend avatar Nov 21 '22 04:11 sarayourfriend