Skip to content

Commit

Permalink
Merge pull request #3370 from activepieces/fix/webhook-errors
Browse files Browse the repository at this point in the history
fix: webhooks errors
  • Loading branch information
abuaboud committed Dec 7, 2023
2 parents 9bfb6b9 + e0d9066 commit 4ca3bdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/backend/src/app/webhooks/webhook-controller.ts
Expand Up @@ -168,13 +168,13 @@ const handleExecutionOutputStatus = async (run: FlowRun, reply: FastifyReply): P
await reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send()
break
case ExecutionOutputStatus.FAILED:
await reply.status(StatusCodes.BAD_REQUEST).send({
await reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({
message: 'The flow has failed and there is no response returned',
})
break
case ExecutionOutputStatus.TIMEOUT:
case ExecutionOutputStatus.RUNNING:
await reply.status(StatusCodes.REQUEST_TIMEOUT).send({
await reply.status(StatusCodes.GATEWAY_TIMEOUT).send({
message: `The request took more than ${Math.floor(POLLING_TIMEOUT_MS / 1000)} seconds`,
})
break
Expand Down

0 comments on commit 4ca3bdc

Please sign in to comment.