-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
While using the API I experienced the following inconveniences that might be worth improvement:
- the API response with an HTML page on faulty requests. Although that is ok-ish, it means I have to write the response to a file and open that in my browser to get the error message. Responding in a more common manner with the correct HTTP status code and a json response may be preferable. The response could still contain a link to the error page for humans, if needed.
- when sending a faulty POST request to the
/incidentsendpoint (e.g. with an invalid data like below), I get redirected to root and the final error only tells me thatPOSTis not allowed for/which is confusing:
example invalid data that will spawn the redirection to root:
{
"name": "<string>",
"status": 0,
"message": "<string>",
"template": "<string>",
"visible": false,
"stickied": false,
"notifications": false,
"occurred_at": "<string>",
"template_vars": [],
"component_id": 123,
"component_status": 1
}- when omitting the API token from the POST request, a redirect failure happens instead of a https://en.wikipedia.org/wiki/HTTP_403 :
Metadata
Metadata
Assignees
Labels
No labels
