Skip to content

Commit

Permalink
[uss_qualifier] scd: OIRSimple - fix error status check and include 4…
Browse files Browse the repository at this point in the history
…04 (interuss#784)
  • Loading branch information
Shastick authored and punamverma committed Oct 16, 2024
1 parent 3201eea commit ef35ed1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,19 @@ def _step_attempt_delete_missing_ovn(self):
# We don't expect the reach this point:
check.record_failed(
summary="OIR Deletion with empty OVN was not expected to succeed",
details=f"Was expecting an HTTP 400 or 409 response because of an empty OVN, but got {q.status_code} instead",
details=f"Was expecting an HTTP 400, 404 or 409 response because of an empty OVN, but got {q.status_code} instead",
query_timestamps=[q.request.timestamp],
)
except QueryError as qe:
self.record_queries(qe.queries)
if qe.cause_status_code in [400 or 409]:
# An empty OVN cen be seen as both an incorrect parameter as well as a conflict
# because the value is incorrect: we accept both a 400 and 409 return code here.
if qe.cause_status_code in [400, 404, 409]:
# An empty OVN can be seen as:
# an incorrect parameter (400), a reference to a non-existing entity (404) as well as a conflict (409)
pass
else:
check.record_failed(
summary="OIR Deletion with empty OVN failed for unexpected reason",
details=f"Was expecting an HTTP 400 or 409 response because of an empty OVN, but got {qe.cause_status_code} instead",
details=f"Was expecting an HTTP 400, 404 or 409 response because of an empty OVN, but got {qe.cause_status_code} instead",
query_timestamps=qe.query_timestamps,
)

Expand Down

0 comments on commit ef35ed1

Please sign in to comment.