mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'api-err' into 'main'
publishEvent: throw errors See merge request soapbox-pub/ditto!451
This commit is contained in:
commit
2cbbf2fbe7
2 changed files with 3 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ class EventsDB implements NStore {
|
|||
} else if (e.message === 'Cannot replace an event with an older event') {
|
||||
return;
|
||||
} else {
|
||||
this.console.debug('ERROR', e.message);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ async function publishEvent(event: NostrEvent, c: AppContext): Promise<NostrEven
|
|||
throw new HTTPException(422, {
|
||||
res: c.json({ error: e.message }, 422),
|
||||
});
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue