mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
tweak: include stack trace in server error responses (#3134)
This commit is contained in:
@@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user