Created
August 28, 2022 09:06
-
-
Save arifsetyawan/e41bc1a9695afc30fc294f313475cb25 to your computer and use it in GitHub Desktop.
Revisions
-
arifsetyawan created this gist
Aug 28, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import { CustomError } from "./custom-error"; export class BadRequestError extends CustomError { statusCode = 400; reason = 'something went wrong'; constructor(public message: string) { super(message); Object.setPrototypeOf(this, BadRequestError.prototype); } serializeError() { return [ { message: this.message } ] } }