File tree Expand file tree Collapse file tree 4 files changed +17
-15
lines changed Expand file tree Collapse file tree 4 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 1- import { Auth } from " ../../src/schemas/auth.ts" ;
1+ import { Auth } from ' ../../src/schemas/auth.ts'
22
3- declare module " fastify" {
4- export interface FastifyRequest {
5- user : Auth
6- }
3+ declare module ' fastify' {
4+ export interface FastifyRequest {
5+ user : Auth
6+ }
77}
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ declare global {
1313 }
1414}
1515
16- export { } ;
16+ export { }
Original file line number Diff line number Diff line change 4949 "react-dom" : " ^18.3.1"
5050 },
5151 "devDependencies" : {
52- "@types/node" : " ^22.0.0" ,
53- "@types/react" : " ^18.3.4" ,
54- "@types/react-dom" : " ^18.3.0" ,
55- "eslint" : " ^9.4.0" ,
52+ "@types/node" : " ^22.5.5" ,
53+ "eslint" : " ^9.11.0" ,
5654 "fastify-tsconfig" : " ^2.0.0" ,
57- "mysql2" : " ^3.10.1 " ,
55+ "mysql2" : " ^3.11.3 " ,
5856 "neostandard" : " ^0.11.5" ,
5957 "tap" : " ^21.0.1" ,
60- "typescript" : " ^5.4.5 "
58+ "typescript" : " ^5.6.2 "
6159 }
6260}
Original file line number Diff line number Diff line change @@ -60,10 +60,14 @@ export default async function serviceApp (
6060 'Unhandled error occurred'
6161 )
6262
63- const statusCode = err . statusCode ?? 500
64- reply . code ( statusCode )
63+ reply . code ( err . statusCode ?? 500 )
6564
66- return { message : 'Internal Server Error' }
65+ let message = 'Internal Server Error'
66+ if ( err . statusCode === 401 ) {
67+ message = err . message
68+ }
69+
70+ return { message }
6771 } )
6872
6973 // An attacker could search for valid URLs if your 404 error handling is not rate limited.
You can’t perform that action at this time.
0 commit comments