Title: fix(webhooks): read every Ashby error shape when webhook registration fails by mzxchandra · Pull Request #6711 · simstudioai/sim · GitHub
Open Graph Title: fix(webhooks): read every Ashby error shape when webhook registration fails by mzxchandra · Pull Request #6711 · simstudioai/sim
X Title: fix(webhooks): read every Ashby error shape when webhook registration fails by mzxchandra · Pull Request #6711 · simstudioai/sim
Description: Summary Follow-up to #6703, found while testing the Ashby webhook triggers end to end against a real organization. The webhook provider read errorInfo.message and a top-level message, but not the errors array. Ashby uses three error shapes in practice, all confirmed live: Shape Observed on errors: [{ message, parameter }] missing module permission errors: ["webhook_not_found"] webhook.delete on an unknown id errorInfo: { code, message, requestId } returned alongside the array A key missing apiKeysWrite fails in the array form, so registering a trigger showed "Unknown Ashby API error" instead of the actual cause. The duplicate-webhook branch made that worse. It only fires when the message was successfully extracted: } else if (/duplicate webhook/i.test(errorMessage)) { So an unparsed error also cost the user the one actionable instruction for recovering — delete the duplicate under Ashby Settings > API/Webhooks — and they got a generic failure instead. Approach Uses the shared ashbyErrorMessage extractor from @/tools/ashby/utils rather than keeping a second partial copy in the provider. That helper already handles all three shapes and is covered by its own tests, so there is one definition of "how to read an Ashby error" instead of two that drift. Checked the import boundary first: linq, clickup, zoho-desk, gitlab, and emailbison providers already import from @/tools, so this follows established precedent rather than introducing a new dependency direction. The delete path now reports why it failed instead of only the HTTP status. Testing Four new tests cover each error shape and the duplicate-guidance path, which previously had no coverage for createSubscription at all. 21 passing in the provider suite. Verified end to end against a real Ashby organization using a cloudflare tunnel, with the job created trigger (job metadata only — no candidate data was ever delivered): webhook.create registered successfully (registration_status: active, real externalId) A signed synthetic jobCreate payload delivered to the registered URL returned 200 Webhook processed The workflow executed from that delivery (trigger=ashby, status=completed) A tampered signature was rejected with 401 Unauthorized, so verification was proven to reject as well as accept Removing the trigger deleted the webhook: "Successfully deleted Ashby webhook subscription 427c6629…" Teardown confirmed independently — deleting the same id again returns webhook_not_found No residue: the webhook is gone from Ashby, local webhook rows are 0. Notes for reviewers The receive path needed no changes. It uses HMAC-SHA256 with a timing-safe safeCompare and rejects both a missing secret and a missing signature. Two things worth knowing that are not changed here: webhook.list does not exist in Ashby's API. Teardown can only be verified by attempting a delete twice, which is what the test above did. Worth knowing if a webhook ever leaks, since you cannot enumerate to find it. Registration happens on deploy, not on save. Saving a trigger creates a candidate webhook row; deploying promotes it to active and calls webhook.create. The block's setup text says the webhook is created "when you save the trigger", which is misleading. Left alone here to keep this diff focused.
Open Graph Description: Summary Follow-up to #6703, found while testing the Ashby webhook triggers end to end against a real organization. The webhook provider read errorInfo.message and a top-level message, but not the e...
X Description: Summary Follow-up to #6703, found while testing the Ashby webhook triggers end to end against a real organization. The webhook provider read errorInfo.message and a top-level message, but not the e...
Opengraph URL: https://github.com/simstudioai/sim/pull/6711
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:842138a9-905d-ffd0-0437-d7a2b0c6a016 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9824:160F17:272793:36E387:6AFB52B4 |
| html-safe-nonce | 36bc610e0ef2d3f77c3e11a400e0be82a726d3fc86c5b4e9ff4e9649f347adb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODI0OjE2MEYxNzoyNzI3OTM6MzZFMzg3OjZBRkI1MkI0IiwidmlzaXRvcl9pZCI6IjY3NzU4MDU1Nzk3OTgyMDUxMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9e20202fb42513c73155f4889b5b95b7f738bff8d962530ff676d630065859f1 |
| hovercard-subject-tag | pull_request:4283564955 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6711/files |
| twitter:image | https://avatars.githubusercontent.com/u/129460234?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/129460234?s=400&v=4 |
| og:image:alt | Summary Follow-up to #6703, found while testing the Ashby webhook triggers end to end against a real organization. The webhook provider read errorInfo.message and a top-level message, but not the e... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width