mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 22:43:06 +08:00
fix: reply with 500 on payload processing error
This commit is contained in:
@@ -179,11 +179,11 @@ export async function buildServer(
|
||||
async (request, reply) => {
|
||||
try {
|
||||
await callback(request.params.uuid, request.body);
|
||||
await reply.code(200).send();
|
||||
} catch (error) {
|
||||
logger.error(error, `ChainhookEventObserver error processing payload`);
|
||||
await reply.code(422).send();
|
||||
await reply.code(500).send();
|
||||
}
|
||||
await reply.code(200).send();
|
||||
}
|
||||
);
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user