mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
[mastodon-client] Return IdentifiableError ID if message is empty
This commit is contained in:
parent
f36515a221
commit
47d9278eae
1 changed files with 1 additions and 0 deletions
|
@ -28,6 +28,7 @@ export async function CatchErrorsMiddleware(ctx: MastoContext, next: () => Promi
|
|||
if (e instanceof MastoApiError) {
|
||||
ctx.status = e.statusCode;
|
||||
} else if (e instanceof IdentifiableError) {
|
||||
if (e.message.length < 1) e.message = e.id;
|
||||
ctx.status = 400;
|
||||
} else if (e instanceof ApiError) {
|
||||
ctx.status = e.httpStatusCode ?? 500;
|
||||
|
|
Loading…
Reference in a new issue