Commit 44eb0754 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(fm): accept empty artefact upload responses

parent f74aae00
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -274,8 +274,11 @@ def upload_artefact(body, federation_context_id, bearer_token=None, partner_api_
    try:
        response = srm.onboarding_artefact(body.to_gsma_input())
        print(f"DEBUG: ECP response status: {response.status_code}, body: {response.text}")
        if response.status_code not in [200, 201]:
        if response.status_code not in [200, 201, 204]:
            try:
                response_data = response.json()
            except ValueError:
                response_data = response.text
            return response_data, 409
    except Exception as error:
        raise APIError(422, f"Unable to upload artefact to Edge Cloud Platform. Error: {error}")