mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-08 14:12:27 -05:00
for use when we don't want API to serve any traffic, but paas is still
running. It's a simple nginx_buildpack app that is pushed separately,
and then two makefile commands that toggle the routes (and also
stop/start the nginx app).
For all endpoints/methods it returns a 503, with the response body.
```
{
"status_code": 503,
"errors": [
{
"error": "PlannedMaintenanceError",
"message": "We’re performing some essential updates. Notify will be back shortly. Please check https://status.notifications.service.gov.uk/ for more details"
}
]
}
```
NB: If you hit `/` it'll still return 404 - as this is defined in the
paas-proxy instance on aws.
What is it?
This is a simple static error page to present to API users in case of a (planned) downtime. It is deployed as an individual app and remains dormant until a route is assigned to it. It returns a 503 error code and a standard json response for all routes.
How do I use it?
It should already be deployed, but if not (or if you need to make changes to the nginx config) you can deploy it by running
cf push notify-api-failwhale
To enable it you need to run
make <environment> enable-failwhale
and to disable it
make <environment> disable-failwhale
Where <environment> is any of
- preview
- staging
- production