Reading an error
A failed action's message starts with a stable code, followed by the phase, the template location when known, and a correlation ID:
ScriptExecutionFailed: C# helper 'Account' threw System.ArgumentException. (phase: render; correlationId: 28c34ce40a3944a5bb67912b1efb1ec0)In run history the runtime wraps it: The service provider action failed with error code '…' and error message '…'. Catch the failure with runAfter Failed and TimedOut, and take the code back out:
"Not_mapped": {
"type": "Response",
"kind": "Http",
"runAfter": { "Compose_using_Liquid": [ "Failed", "TimedOut" ] },
"inputs": {
"statusCode": 422,
"body": {
"code": "@first(split(last(split(string(outputs('Compose_using_Liquid')?['body']?['message']), 'error message ''')), ':'))",
"message": "@outputs('Compose_using_Liquid')?['body']?['message']"
}
}
}Codes
| Code | HTTP | Typical cause |
|---|---|---|
| InvalidRequest | 400 | Missing or contradictory inputs, timeoutSeconds above the host maximum, an invalid Function registry |
| InvalidInputJson | 400 | Duplicate property names, numbers out of range |
| InvalidInputXml | 400 | Malformed XML, or a DTD |
| TemplateNotFound | 404 | The template or a partial is missing |
| TemplateAccessDenied | 403 | A path outside the template folder |
| TemplateSyntaxError | 400 | Liquid syntax, an invalid XPath, an include cycle, a misplaced csharp block, an unsupported tag |
| UnknownFilter | 400 | A misspelled or lowercase filter |
| InvalidOutputJson | 400 | JSON output that is not exactly one valid value |
| ScriptsDisabled | 403 | A C# block without enableScripts, or LiquidCompose__AllowScripts not true |
| UnsupportedScriptFeature | 400 | Overloads, generics, two parameters, int, static fields |
| ScriptCompilationFailed | 400 | A C# compile error, at the template line |
| ScriptExecutionFailed | 400 | A helper threw, returned null, or got a null or wrongly typed value |
| FunctionNotAllowed | 403 | Alias not in allowedFunctionAliases or the registry, or disabled |
| FunctionAuthenticationFailed | 424 | 401/403 from the Function, a missing key setting, or no token |
| FunctionHttpFailed | 424 | A non-200 status, a redirect or a network failure |
| FunctionResponseInvalid | 424 | Not text/plain UTF-8, or too large |
| FunctionTimeout | 424 | No answer within the entry's timeoutSeconds |
| ResourceLimitExceeded | 413 | A size, depth, loop, node or call-count limit |
| TransformationTimeout | 400 | The deadline passed; the worker was stopped |
| WorkerUnavailable | 503 | The worker is missing or failed to start, or every worker is busy and the queue is full |
With LiquidCompose__PlatformRetries=true, the Function, timeout and internal failures use 5xx statuses instead.