Closed glasserc closed 6 years ago
Most db errors render a JSON response, but this one's a failure to checkout a db conn from the pool. Due to our web framework (Rocket) this is done in a rocket request guard which currently lacks an easy way to customize error responses.
It can be worked around though.
On my machine, the
__heartbeat__
endpoint works fine when the database is up, but when I shut it down, the same endpoint just hangs, with megaphone dumping errors to console likeError: Can't connect to MySQL server on 'golden-cloud.local' (111)
. After about 30 seconds, I get an error response like this:Technically, I guess this is correct -- the 503 indicates that the heartbeat has failed -- but based on the structure of the JSON response, I assumed that it was possible for a response to have
status
beok
butdatabase
beerror
.