tweak: include stack trace in server error responses (#3134)
parent
f81c469f17
commit
066e4f064d
|
|
@ -71,7 +71,8 @@ export namespace Server {
|
|||
status: 400,
|
||||
})
|
||||
}
|
||||
return c.json(new NamedError.Unknown({ message: err.toString() }).toObject(), {
|
||||
const message = err instanceof Error && err.stack ? err.stack : err.toString()
|
||||
return c.json(new NamedError.Unknown({ message }).toObject(), {
|
||||
status: 400,
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue