Skip to content

Commit

Permalink
fix evaluation of not-implemented for stepfunction (localstack#8856)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffyP authored Aug 8, 2023
1 parent 570f085 commit 56b93e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/capture_notimplemented_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def simulate_call(service: str, op: str) -> RowEntry:
parameters = generate_request(op_model) or {}
result = _make_api_call(client, service, op, parameters)
error_msg = result.get("error_message", "")

if result.get("error_code", "") == "InternalError":
# some deeper investigation necessary, check for some common errors here and retry
if service == "apigateway" and "Unexpected HTTP method" in error_msg:
Expand Down Expand Up @@ -133,7 +134,9 @@ def simulate_call(service: str, op: str) -> RowEntry:
else:
# keyword argument not found in the parameters
break

elif result.get("error_code", "") == "UnsupportedOperation" and service == "stepfunctions":
# the stepfunction lib returns 500 for not implemented + UnsupportedOperation
result["status_code"] = 501 # reflect that this is not implemented
if result.get("status_code") in [0, 901, 902, 903]:
# something went wrong, we do not know exactly what/why - just try again one more time
logging.debug(
Expand Down

0 comments on commit 56b93e4

Please sign in to comment.