diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index 01cf6983df4f9054173f156e8321472c558a4fd2..bd95295822cc491274586efecf0b3ed135554236 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -73,7 +73,8 @@ def _send_request(operation: CUDOperation, endpoint: str, parameters: dict, call elif operation == CUDOperation.DELETE: request = requests.delete(url, json=parameters, timeout=10000) - if request.status_code != HTTPStatus.OK: + if not HTTPStatus.OK <= request.status_code < HTTPStatus.MULTIPLE_CHOICES: + # :term:`LSO` has returned a status code that is outside the 2xx range, and has therefore failed logger.debug(request.content) raise AssertionError(request.content)