Skip to content

Commit eaa6d7b

Browse files
committed
fix: reply with 500 on payload processing error
1 parent 5b42124 commit eaa6d7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/client/typescript/src/server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ export async function buildServer(
179179
async (request, reply) => {
180180
try {
181181
await callback(request.params.uuid, request.body);
182+
await reply.code(200).send();
182183
} catch (error) {
183184
logger.error(error, `ChainhookEventObserver error processing payload`);
184-
await reply.code(422).send();
185+
await reply.code(500).send();
185186
}
186-
await reply.code(200).send();
187187
}
188188
);
189189
done();

0 commit comments

Comments
 (0)