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

调用含自定义路由函数的Logic App工作流保存失败,如何调试?

解决Logic App调用Function App时的InvalidFunctionRoute错误

错误提示明确指出问题:你的Function配置了自定义路由,而Logic App的Function连接器不支持调用带自定义路由的函数。以下是具体调试和解决步骤:

  • 检查目标Function的function.json配置文件
    找到你调用的myfunctionapp对应的function.json文件,查看HTTP触发器的配置段。如果存在"route"字段(比如"route": "custom/path"),这就是导致错误的原因。

    示例错误配置:

    {
      "scriptFile": "__init__.py",
      "bindings": [
        {
          "authLevel": "function",
          "type": "httpTrigger",
          "direction": "in",
          "name": "req",
          "route": "my/custom/route"
        },
        {
          "type": "http",
          "direction": "out",
          "name": "$return"
        }
      ]
    }
    
  • 移除自定义路由配置
    删除function.json中的"route"字段,让Function使用Azure默认的路由格式(/api/<function-name>)。修改后的配置示例:

    {
      "scriptFile": "__init__.py",
      "bindings": [
        {
          "authLevel": "function",
          "type": "httpTrigger",
          "direction": "in",
          "name": "req"
        },
        {
          "type": "http",
          "direction": "out",
          "name": "$return"
        }
      ]
    }
    
  • 重新部署并验证
    将修改后的Function代码重新部署到Azure Function App,回到Logic App工作流中重新选择该Function,尝试保存工作流,此时错误应该会消失。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.16 09:41:00