Skip to content

Commit

Permalink
Bumped v4.26.1
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <hello@matteocollina.com>
  • Loading branch information
mcollina committed Feb 12, 2024
1 parent 3a646b8 commit ffbc92c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion fastify.js
@@ -1,6 +1,6 @@
'use strict'

const VERSION = '4.26.0'
const VERSION = '4.26.1'

const Avvio = require('avvio')
const http = require('node:http')
Expand Down
57 changes: 28 additions & 29 deletions lib/error-serializer.js
Expand Up @@ -25,35 +25,34 @@

if (obj === null) return '{}'


let addComma = false
let json = '{'

if (obj["statusCode"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"statusCode\":"
json += serializer.asNumber(obj["statusCode"])
}

if (obj["code"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"code\":"
json += serializer.asString(obj["code"])
}

if (obj["error"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"error\":"
json += serializer.asString(obj["error"])
}

if (obj["message"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"message\":"
json += serializer.asString(obj["message"])
}

return json + '}'
let json = '{'
let addComma = false

if (obj["statusCode"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"statusCode\":"
json += serializer.asNumber(obj["statusCode"])
}

if (obj["code"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"code\":"
json += serializer.asString(obj["code"])
}

if (obj["error"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"error\":"
json += serializer.asString(obj["error"])
}

if (obj["message"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"message\":"
json += serializer.asString(obj["message"])
}

return json + '}'

}

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "fastify",
"version": "4.26.0",
"version": "4.26.1",
"description": "Fast and low overhead web framework, for Node.js",
"main": "fastify.js",
"type": "commonjs",
Expand Down

0 comments on commit ffbc92c

Please sign in to comment.