Error/Issue:
Found few instances of logic app failed today, in an action where there is call to rest api of an application with an error:
InvalidTemplate. Unable to process template language expressions in action 'HTTP_Call_to_xxx_Application' inputs at line '0' and column '0': 'The template language function 'json' parameter is not valid. The provided value '{ "payload": { "Environment":"dev", "number":"xxx", "Brand":"TestBrand1", "ChannelName":"channel_xxx", "Language":"en-US", "Status":"Failure", "siteURL":"http://xxx.dev-xxx.com", "InterfaceName":"xxx", "Reason":"xxx process Failed.xxxx publish failed : SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_includes_value' at row 1: INSERT INTO "node__field_includes" ("entity_id", "revision_id", "bundle", "delta", "langcode", "field_includes_value", "field_includes_format") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6);
Why it happened
Below are few Rules for JSON syntax:
- A JSON object is surrounded by curly braces
{}
. - The name-value pairs are grouped by a colon
(:)
and separated by a comma(,)
. - An array begins with a left bracket and ends with a right bracket
[]
. - The trailing commas and leading zeros in a number are prohibited.
- The octal and hexadecimal formats are not permitted.
- Each key within the JSON should be unique and should be enclosed within the double-quotes.
- If value is of type string then it should be enclosed within the double-quotes.
- The boolean type matches only two special values:
true
andfalse
and NULL values are represented by thenull
literal (without quotes).
What to do
Learn More about some more Logic App errors
- The request has both SAS authentication scheme and 'Bearer' authorization scheme. Only one scheme should be used
- Selected file must be between 1 and 2097152 bytes
- SplitOn property doesn't validate expression at design time
- The workflow with 'Response' action type should not have triggers with 'splitOn' property
- The template language function 'xpath' expects its first parameter to be an XML object
- The template language expression 'xxx' cannot be evaluated because property 'xxx' doesn't exist. Property selection is not supported on content of type 'application/xml'