add more details to StatusErrors
This commit is contained in:
parent
e9eaafae41
commit
6627e8a9b8
4 changed files with 7 additions and 5 deletions
|
|
@ -18,6 +18,8 @@ export function renderInlineError(err: unknown): string {
|
|||
if (err instanceof StatusError) {
|
||||
if (err.message) {
|
||||
return `${err.name} ${err.statusCode}: ${err.message}`;
|
||||
} else if (err.statusMessage) {
|
||||
return `${err.name} ${err.statusCode}: ${err.statusMessage}`;
|
||||
} else {
|
||||
return `${err.name} ${err.statusCode}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue