@athenna/http 5.4.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/http",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "The Athenna Http server. Built on top of fastify.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
@@ -27,7 +27,7 @@ export class HttpExceptionHandler {
27
27
  async handle({ error, response }) {
28
28
  const body = {
29
29
  statusCode: Json.copy(error.statusCode) || Json.copy(error.status) || 500,
30
- code: String.toSnakeCase(error.code || error.name).toUpperCase(),
30
+ code: String.toSnakeCase(error.code || error.name || 'E_INTERNAL_SERVER').toUpperCase(),
31
31
  name: Json.copy(error.name),
32
32
  message: Json.copy(error.message),
33
33
  details: Json.copy(error.details),