map failure page to error code if any, when Script run when task failed (#4149)
This commit is contained in:
@@ -1676,6 +1676,20 @@ def __build_base_task_statement(
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
# Add error_code_mapping if it exists
|
||||
if block.get("error_code_mapping") is not None:
|
||||
args.append(
|
||||
cst.Arg(
|
||||
keyword=cst.Name("error_code_mapping"),
|
||||
value=_value(block.get("error_code_mapping")),
|
||||
whitespace_after_arg=cst.ParenthesizedWhitespace(
|
||||
indent=True,
|
||||
last_line=cst.SimpleWhitespace(INDENT),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
if block.get("block_type") == "task_v2":
|
||||
args.append(
|
||||
cst.Arg(
|
||||
|
||||
Reference in New Issue
Block a user