From 128210ee8d13c2c70de247073e34a0547c52e005 Mon Sep 17 00:00:00 2001 From: Aaron Osher Date: Tue, 7 Apr 2020 01:20:52 +0100 Subject: [PATCH] Change failed status check error code --- src/app/controllers/status.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/controllers/status.ts b/src/app/controllers/status.ts index 27abfde..f8f779d 100644 --- a/src/app/controllers/status.ts +++ b/src/app/controllers/status.ts @@ -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'; @@ -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,