-
Task: Problem: Goal: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To handle the HTTP 400 status code without causing a workflow error, you can use conditional logic to interpret the response and decide the next action. While I couldn't find a specific way to configure the HTTP Step to ignore error codes like 400, you can use the response in a conditional step to decide whether to proceed with creating a new channel. Here's an example of how you might structure your workflow: steps:
- name: check-channel
provider:
type: http
with:
url: "https://api.messenger.com/check-channel"
on-failure:
retry:
count: 0 # No retries, handle the error in the next step
actions:
- name: create-channel
if: "{{ steps.check-channel.results.status_code == 400 }}"
provider:
type: http
with:
url: "https://api.messenger.com/create-channel"
method: POST
body:
name: "new-channel" In this setup, the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Hey @roma55443: we actually support that in webhook provider: I’ll implement it for http provider too so you can control it. You will have it by tomorrow :) |
Beta Was this translation helpful? Give feedback.
Hey @roma55443: we actually support that in webhook provider:
keep/keep/providers/webhook_provider/webhook_provider.py
Line 265 in 1bc6317
I’ll implement it for http provider too so you can control it. You will have it by tomorrow :)