首页 > 解决方案 > 逻辑应用无法反序列化 Azure 数据工厂管道错误消息

问题描述

我在使用 Logic App 的 Azure 数据工厂遇到以下问题。

我正在使用 Azure 数据工厂管道进行迁移,并使用逻辑应用向技术团队发送“成功与失败”通知。现在成功运行良好,因为消息是硬编码的,但失败不是因为逻辑应用 Web 活动无法解析数据工厂管道错误。

这是要进入 Logic App Web 活动 Input 的输入

{
"url": "https://xxxxxxxxxxxxxxxxx",
"method": "POST",
"headers": {},
"body": "{\n \"title\": \"PIPELINE RUN FAILED\",\n \"message\":\"Operation on target Migration Validation failed: Execution fail against sql server. Sql error number: 50000. Error Message: The DELETE statement conflicted with the REFERENCE constraint \"FK_cmclientapprovedproducts_cmlinkclientchannel\". The conflict occurred in database \"Core7\", table \"dbo.cmClientApprovedProducts\", column 'linkclientchannelid'.\",\n \"color\": \"Red\",\n \"dataFactoryName\": \"LFC-TO-MCP-ADF\",\n \"pipelineName\": \"LFC TO MCP MIGRATION\",\n \"pipelineRunId\": \"f4f84365-58f0-4da1-aa00-64c3a4daa9e1\",\n \"time\": \"2020-07-31T22:44:01.6477435Z\"\n}"
}

这是应用程序抛出的错误逻辑

failures
    {
    "errorCode": "2108",
    "message": "{\"error\":{\"code\":\"InvalidRequestContent\",\"message\":\"The request content is not valid and could not be deserialized: 'After parsing a value an unexpected character was encountered: F. Path 'message', line 3, position 202.'.\"}}",
    "failureType": "UserError",
    "target": "Send Failed Notification",
    "details": []
    }

我尝试了各种选项,例如设置变量并使用各种现有方法(字符串、json、替换等)进行转换,但没有运气,例如@string(activity('LOS migration').Error.Message) 几乎整天都在苦苦挣扎...请建议是否有人遇到类似问题...

下面是数据流活动 在此处输入图像描述

在此处输入图像描述

标签: azure-logic-appsazure-data-factory-2

解决方案


现在它正在工作...将正文内容粘贴到正文文本字段框中,而无需在调用逻辑应用程序的 Web 活动中单击“添加动态内容”。


推荐阅读