Return original error code after logging an error to sentry #6178
DanielKraemer
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
My suggestion:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to access my payloadcms content using the REST API.
Before enabling sentry logging I got the error return "403 - Unauthorized".
After enabling sentry logging, then everytime an error occurs I'll receive code 500 (Internal Server Error) and the sentry logging id.
Caused by
payload/packages/plugin-sentry/src/startSentry.ts
Line 56 in 83551bf
Error 500 means "Internal Server Error". But the server didn't crash. I'm just unauthorized in that case. So the in my opinion, the correct way to return this error is keeping the original error code and message.
Beta Was this translation helpful? Give feedback.
All reactions