Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug 1909875: improve CrashIdsFailedToPublish information
When a user uses the Reprocessing API, they send some number of crash ids to be reprocessed. If something happens when publishing the crash ids to PubSub, the crash id is added to a "failed" list and the exception is logged. Then at the end if there were any failures, a CrashIdsFailedToPublish exception is thrown with the list of failures. That causes Django to return an HTTP 500 to the user and sentry captures the CrashIdsFailedToPublish exception, but the event isn't very helpful--we have no idea what happened. This attempts to alleviate that in a couple of ways: 1. It uses sentry_sdk.capture_exception() to capture each problem enountered when publishing to PubSub. We'll be able to see what's going on in Sentry events. 2. It keeps track of the errors along with the crash ids and wraps that in the CrashIdsFailedToPublish exception message so we're not ending up with just a list of crash ids--we get the errors, too.
- Loading branch information