Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
failure_type=FailureType.transient_error,
error_message="HTTP Status Code: 408. Error: Request timeout.",
),
413: ErrorResolution(
response_action=ResponseAction.FAIL,
failure_type=FailureType.system_error,
error_message="HTTP Status Code: 413. Error: The request or its response exceeds the size limit accepted by the API.",
),
429: ErrorResolution(
response_action=ResponseAction.RATE_LIMITED,
failure_type=FailureType.transient_error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
408,
DEFAULT_ERROR_MAPPING[408],
),
(
"_with_http_response_status_413",
413,
ErrorResolution(
response_action=ResponseAction.FAIL,
failure_type=FailureType.system_error,
error_message="HTTP Status Code: 413. Error: The request or its response exceeds the size limit accepted by the API.",
),
),
(
"_with_unmapped_http_status_418",
418,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
pytest.param(403, DEFAULT_ERROR_MAPPING[403], id="403 mapping"),
pytest.param(404, DEFAULT_ERROR_MAPPING[404], id="404 mapping"),
pytest.param(408, DEFAULT_ERROR_MAPPING[408], id="408 mapping"),
pytest.param(413, DEFAULT_ERROR_MAPPING[413], id="413 mapping"),
],
)
def test_matches_mapped_http_status_code(http_code, expected_error_resolution):
Expand Down
Loading