mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tweak: include stack trace in server error responses (#3134)
This commit is contained in:
parent
f81c469f17
commit
066e4f064d
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue