Skip to content

Commit e5139bf

Browse files
committed
add nit
1 parent 7593a79 commit e5139bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ In order to properly `401` errors:
110110
fastify.setErrorHandler(function (err, req, reply) {
111111
if (err.statusCode === 401) {
112112
// this was unauthorized! Display the correct page/message.
113-
reply.send({ was: 'unauthorized' })
113+
reply.code(401).send({ was: 'unauthorized' })
114114
return
115115
}
116116
reply.send(err)

0 commit comments

Comments
 (0)