You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Logic App:如何将特定请求的预期失败排除在运行失败判定外

Absolutely! You can totally configure your Logic App to treat that specific 404 response as an acceptable outcome instead of flagging the entire run as failed. Here's a step-by-step breakdown to make this work:

1. Update the HTTP Action's Success Status Code Range

First, find the HTTP action that calls your third-party API. Click the three dots (...) in the top-right corner of the action and select Settings.

In the settings panel, look for the Response handling section. By default, the Success status codes field is set to 200-299. Modify this to include 404, so it becomes 200-299, 404.

This tells Logic App that a 404 response from this specific API call is not an error—instead, it’s a valid success state, and the run won’t be marked as failed in the overview.

2. Add a Condition to Handle the 404 Scenario

Just because 404 is now considered a success doesn’t mean you don’t need to handle it differently from a 2xx response. Add a Condition action right after your HTTP call:

  • On the left side, select the Status code output from the HTTP action
  • Choose the operator is equal to
  • On the right side, enter 404

Then:

  • In the If yes branch: Build your logic for when the dataset doesn’t exist (this is the flow you previously had in the "Run after failed" section)
  • In the If no branch: Handle the case where the dataset exists (your normal success flow)
3. Optional: Verify with Run History

After making these changes, test the flow with both existing and non-existing datasets. You’ll see that runs that hit the 404 will show up as Succeeded in the overview page, and your condition will route the flow correctly based on the status code.

A quick note: Make sure this 404 is only for the "dataset not found" scenario. If the API returns 404 for other errors (like invalid endpoints), you might want to add an extra check on the response body to confirm it’s the expected "data missing" 404 before treating it as acceptable.

内容的提问来源于stack exchange,提问作者Bauza23

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 07:48:29