From 3a9e917e2e963f7e5ecf0132b0ee5d41b204942d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sun, 9 Jul 2023 23:39:48 +0200 Subject: [PATCH] [mastodon-client] return 404 instead of 401 on NO_SUCH_NOTE --- packages/backend/src/server/api/mastodon/endpoints/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 1bff3aa4c..caa9d1d68 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -105,7 +105,7 @@ export function apiStatusMastodon(router: Router): void { ctx.body = convertStatus(data.data); } catch (e: any) { console.error(e); - ctx.status = 401; + ctx.status = ctx.status == 404 ? 404 : 401; ctx.body = e.response.data; } });