From fae2fe3837d8654f17a676bd0ab532f3d251b818 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 3 Jan 2022 18:35:54 -0700 Subject: [PATCH] Add some documentation to the status enum --- common/src/enums/Status.ts | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/common/src/enums/Status.ts b/common/src/enums/Status.ts index a252cba..73fdf94 100644 --- a/common/src/enums/Status.ts +++ b/common/src/enums/Status.ts @@ -1,7 +1,28 @@ export enum Status { + /** The request was successful */ Success = 200, - UnknownError = 400, + + /** + * The request contains malformed data and cannot be processed. + */ + BadRequest = 400, + + /** + * Some data is out of date and needs to be updated before another request + * can be made. Check the "message" for additional information. + */ OutOfDate = 401, + + /** + * Something in the request couldn't be found. Check the "message" for + * additional information. + */ NotFound = 404, - Teapot = 418, + + /** + * Something went wrong in the server that we don't have a more specific + * error for. Check the "message" for additional details. This may be + * fixable by the client who made the request, it may not be. + */ + UnknownError = 500, } \ No newline at end of file