Skip to content

Commit

Permalink
Change failed status check error code
Browse files Browse the repository at this point in the history
  • Loading branch information
erinosher committed Apr 7, 2020
1 parent faf4d7e commit 128210e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/controllers/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://opensource.org/licenses/MIT

import { Controller, Get } from '@overnightjs/core';
import { INTERNAL_SERVER_ERROR, OK } from 'http-status-codes';
import { OK, SERVICE_UNAVAILABLE } from 'http-status-codes';
import { Request, Response } from 'express';
import Axios from 'axios';
import { BASE_URL } from '../../config';
Expand Down Expand Up @@ -61,7 +61,7 @@ class StatusController {
healthy = false;
}

return res.status(healthy ? OK : INTERNAL_SERVER_ERROR).json({
return res.status(healthy ? OK : SERVICE_UNAVAILABLE).json({
healthy,
database,
discord,
Expand Down

0 comments on commit 128210e

Please sign in to comment.