mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-03 12:34:28 +01:00
Merge branch 'api-err' into 'main'
publishEvent: throw errors See merge request soapbox-pub/ditto!451
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user