mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[mastodon-client] Fix getNoteOr404
This commit is contained in:
parent
afd9e236a3
commit
153c08fae1
@ -388,9 +388,8 @@ export class NoteHelpers {
|
||||
}
|
||||
|
||||
public static async getNoteOr404(id: string, user: ILocalUser | null): Promise<Note> {
|
||||
return getNote(id, user).then(p => {
|
||||
if (p === null) throw new MastoApiError(404);
|
||||
return p;
|
||||
return getNote(id, user).catch(_ => {
|
||||
throw new MastoApiError(404);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user