Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 56b93e4

Browse files
authored
fix evaluation of not-implemented for stepfunction (#8856)
1 parent 570f085 commit 56b93e4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/capture_notimplemented_responses.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def simulate_call(service: str, op: str) -> RowEntry:
7373
parameters = generate_request(op_model) or {}
7474
result = _make_api_call(client, service, op, parameters)
7575
error_msg = result.get("error_message", "")
76+
7677
if result.get("error_code", "") == "InternalError":
7778
# some deeper investigation necessary, check for some common errors here and retry
7879
if service == "apigateway" and "Unexpected HTTP method" in error_msg:
@@ -133,7 +134,9 @@ def simulate_call(service: str, op: str) -> RowEntry:
133134
else:
134135
# keyword argument not found in the parameters
135136
break
136-
137+
elif result.get("error_code", "") == "UnsupportedOperation" and service == "stepfunctions":
138+
# the stepfunction lib returns 500 for not implemented + UnsupportedOperation
139+
result["status_code"] = 501 # reflect that this is not implemented
137140
if result.get("status_code") in [0, 901, 902, 903]:
138141
# something went wrong, we do not know exactly what/why - just try again one more time
139142
logging.debug(

0 commit comments

Comments
 (0)