diff --git a/package-lock.json b/package-lock.json index ba2fb3d..4420374 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/http", - "version": "5.5.0", + "version": "5.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/http", - "version": "5.5.0", + "version": "5.6.0", "license": "MIT", "devDependencies": { "@athenna/artisan": "^5.1.0", diff --git a/package.json b/package.json index 253181c..a928da9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/http", - "version": "5.5.0", + "version": "5.6.0", "description": "The Athenna Http server. Built on top of fastify.", "license": "MIT", "author": "João Lenon ", diff --git a/src/handlers/HttpExceptionHandler.ts b/src/handlers/HttpExceptionHandler.ts index 05afe5d..967057e 100644 --- a/src/handlers/HttpExceptionHandler.ts +++ b/src/handlers/HttpExceptionHandler.ts @@ -33,7 +33,7 @@ export class HttpExceptionHandler { const body: any = { statusCode: Json.copy(error.statusCode) || Json.copy(error.status) || 500, code: String.toSnakeCase( - error.code || error.name || 'E_INTERNAL_SERVER' + `${error.code}` || error.name || 'E_INTERNAL_SERVER' ).toUpperCase(), name: Json.copy(error.name), message: Json.copy(error.message),