diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index 0aa6d8fbeb4d95ad15b06e39ebcda97905a354f3..d705f3de30f941dca2834d021b06d188359ddd63 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -6,7 +6,6 @@ import json import logging from functools import partial -from http import HTTPStatus from typing import Any import requests @@ -74,10 +73,7 @@ def _send_request(operation: CUDOperation, endpoint: str, parameters: dict, call elif operation == CUDOperation.DELETE: request = requests.delete(url, json=parameters, timeout=10000) - 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) + request.raise_for_status() _send_post = partial(_send_request, CUDOperation.POST)