From fa9cce7b671414ccad9928f7bc26be76239ccb80 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 10:49:52 -0800 Subject: [PATCH] feat: Add default value for NotImplementedException --- .../src/nextjs-exception-middleware/http-exceptions.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/nextlove/src/nextjs-exception-middleware/http-exceptions.ts b/packages/nextlove/src/nextjs-exception-middleware/http-exceptions.ts index 3305ed8cc..f4bd30151 100644 --- a/packages/nextlove/src/nextjs-exception-middleware/http-exceptions.ts +++ b/packages/nextlove/src/nextjs-exception-middleware/http-exceptions.ts @@ -88,13 +88,17 @@ export class NotFoundException extends HttpException { export class NotImplementedException extends HttpException { constructor( - public metadata: HttpExceptionMetadata, - options?: ThrowingOptions + public metadata: HttpExceptionMetadata = { + type: "not_implemented", + message: "Not implemented", + }, + options?: ThrowingOptions, ) { - super(501, metadata, options) + super(501, metadata, options); } } + export class MethodNotAllowedException extends HttpException { constructor( public metadata: HttpExceptionMetadata,