Dear Oryers! Once again, webhooks have got me flab...
# ory-network
c
Dear Oryers! Once again, webhooks have got me flabbergasted. I just enabled "can_interrupt" and "response.parse" in my login webhook config, and lo and behold, the hook in its entirety stopped firing. The lack of introspection prevents me from debugging further, so could anyone please with sugar ontop look into some logs for me? 😇
✅ 1
Copy code
login:
      after:
        default_browser_return_url: <https://app.igniteprocurement.com/>
        hooks:
        - config:
            auth:
              config:
                in: header
                name: Authorization
                value: Bearer REDACTED
              type: api_key
            body: <https://storage.googleapis.com/bac-gcs-production/644f701dddf81a79aeb0f6e47412e598c1d706f429a7cb3704cdc7d9cb650c1ff6a93ddd577852c529b6d20f3acae36d72cc422efbc6f9a9f0a11325edc4a80f.jsonnet>
            can_interrupt: true
            method: POST
            response:
              ignore: false
              parse: true
            url: <https://authsidecar.igniteprocurement.com/api/v1/verify/login>
          hook: web_hook
Actually, I lied, it just took like a five minute break. It's back now, wohoo!
Oooh, I think I know why! It's probably because I (kinda wrongfully) returned 500 for something that shoulda probably been either a 403 or a 404. My educated guess is you have some kinda logic that times out misbehaving webhooks if they return too many 5xx's within a certain time period - @steep-lamp-91158 maybe you can confirm?
r
The hook fired three times and each time got a 500 error back, after which kratos gave up and aborted the flow.
regarding the missing webhooks: I’ll need to investigate more.
c
Yeah, I actually got that message back, that it failed after three times, which is good! Then it just cut out for like 10 minutes or something, before it came back - which I also think is a good thing, entirely fair design to just skip webhooks that consistently misbehave.
Like, if the service containing our webhooks fails entirely, it's a good thing that ory skips the webhooks until the service is healthy again - much better than all users getting denied access forever
Oh. It just halted again. That's weird.