Open nikclayton opened 1 year ago
Yes, this page is served from our CDN when the backend is not available.
@timetinytim when you have time, this could be a nice improvement to have a custom JSON returned on errors on /api/
I will leave this open as I think Mastodon's itself has this behaviour, and this might need fixing as well.
I wouldn't categorise it as an "improvement", I'd say it's a bug fix, so that the API endpoints are correct w.r.t. the documentation; https://docs.joinmastodon.org/client/intro/ notes:
The Mastodon REST API uses HTTP for its requests, and JSON for its payloads. [...] The Mastodon REST API will return JSON as the response text.
I'm not sure if this is a different instance of the same underlying problem, or a different problem, but I just saw this again with a 503 response to a properly authenticated DELETE
request to https://mastodon.social/api/v2/filters/48363
@renchap we probably also need an adjustment to the nginx configuration that we distribute to ensure /api/
if failed returns JSON.
Steps to reproduce the problem
Expected behaviour
An HTTP 503 with JSON content (possibly empty)
Actual behaviour
An HTML error page was returned
Detailed description
At the time of writing:
v2/instance
endpoint, so I can't tell you what the current version is.This may also not be a Mastodon server issue -- maybe you're running frontend load balancers and they're all configured to return this error page for every request, and they need to be configured to return something different for
/api/...
requests?Specifications
Don't know, because the the server is unavailable.