Fix nil actor errors in Sentry API handler
The Golang SDK often sends up multiple exceptions, with the second one containing more context with the appropriate stack trace. Previously the API handler assumed that the stacktrace existed for the first exception. However, this assumption can be wrong, leading to 500 errors when clients attempt to report an error to GitLab. Since the GitLab API can only track one Sentry exception, we now choose the first exception that has a stacktrace. We also also gracefully handle an empty stacktrace by reporting no actor. Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/348672 Changelog: fixed
Showing
Please register or sign in to comment