gristlabs / grist-core

Grist is the evolution of spreadsheets.
https://www.getgrist.com/
Apache License 2.0
7.04k stars 311 forks source link

Webhook considers HTTP 201 an error #1204

Open tennox opened 2 weeks ago

tennox commented 2 weeks ago

Describe the current behavior

My webhook target (windmill) returns HTTP 201, and grist seems to consider this an error:

{"status":"retrying","numWaiting":92,"updatedTime":1726065614947,"lastEventBatch":{"status":"failure","httpStatus":201,"errorMessage":"0191e187-1ff1-2d4e-8058-c1e4e0825982","size":68,"attempts":14},"lastSuccessTime":null,"lastFailureTime":1726065614947,"lastErrorMessage":"0191e187-1ff1-2d4e-8058-c1e4e0825982","lastHttpStatus":201}

Steps to reproduce

  1. Have a webhook URL that returns HTTP 201
  2. See grist in status failure

Describe the expected behavior

No response

Where have you encountered this bug?

Instance information (when self-hosting only)

No response

paulfitz commented 2 weeks ago

Thanks for reporting this @tennox ! You're right, our behavior looks naive: https://github.com/gristlabs/grist-core/blob/963e26dda61ae32c36dba67972c723e39873a4c3/app/server/lib/Triggers.ts#L801-L804