fix: provide NoSuchNoteError error
This commit is contained in:
parent
5d65e34078
commit
fa13b815ef
2 changed files with 8 additions and 0 deletions
|
@ -52,6 +52,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
} catch (e) {
|
||||
if (e instanceof ClipService.NoSuchClipError) {
|
||||
throw new ApiError(meta.errors.noSuchClip);
|
||||
} else if (e instanceof ClipService.NoSuchNoteError) {
|
||||
throw new ApiError(meta.errors.noSuchNote);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue