-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Description
Important Details
How are you running Sentry?
- On-Premise w/ Docker, version 20.10.1
- Saas (sentry.io)
- Other, version 20.10.1:
- Dev environment as described here: https://develop.sentry.dev/environment/
Description
When issuing a POST
request to /sentry-apps/
to create an internal integration, I get a 500 Internal Server Error
response.
More details here:
https://forum.sentry.io/t/post-sentry-apps-is-responding-with-a-500-status/11659
Steps to Reproduce
- Issue the following request to https://sentry.io/api/0/sentry-apps/:
- Method:
POST
- Payload:
{
"scopes": [
"project:read",
"team:read",
"event:read",
"org:read",
"member:read"
],
"isAlertable": true,
"name": "test123",
"webhookUrl": "https://ad33a9a4ac54.ngrok.io",
"events": [
"issue"
]
}
- Receive a
500 Internal Server Error
response, with a payload similar to this one:
{
"detail": "Internal Error",
"errorId": "0624bff51cf644c3b23fca61bbd89849"
}
What you expected to happen
The expected behaviour should be to get a 201 Created
response, together with the data corresponding to the newly created Sentry app.
Possible Solution
The problem arises when the organization
field is not provided as part of the payload. In such case, the request is interpreted and validated as GET /sentry-apps/
, but forwarded to the POST /sentry-apps/
handler.
Additional and proper validation needs to be added to the /sentry-apps/
endpoint so that appropiate HTTP error codes (and messages) are returned to users.
Metadata
Metadata
Assignees
Labels
No labels