mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-09-18 21:38:07 +00:00
support ApiError responses in renderError
This commit is contained in:
parent
e78c4d99f6
commit
cd5a4ee392
1 changed files with 4 additions and 0 deletions
|
@ -154,6 +154,10 @@ export function printError(error: unknown): string {
|
|||
if ('id' in error.info.e && typeof (error.info.e.id) === 'string') return error.info.e.id;
|
||||
}
|
||||
}
|
||||
|
||||
if ('message' in error && typeof (error.message) === 'string') return error.message;
|
||||
if ('code' in error && typeof (error.code) === 'string') return error.code;
|
||||
if ('id' in error && typeof (error.id) === 'string') return error.id;
|
||||
}
|
||||
|
||||
return String(error);
|
||||
|
|
Loading…
Add table
Reference in a new issue