add more details to StatusErrors

This commit is contained in:
Hazelnoot 2025-05-22 10:53:38 -04:00
parent e9eaafae41
commit 6627e8a9b8
4 changed files with 7 additions and 5 deletions

View file

@ -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}`;
}