#40 koji-search-containers: raise when metadata.json download fails
Merged 5 years ago by tkopecek. Opened 5 years ago by ktdreyer.
ktdreyer/koji-tools search-containers-check-response  into  master

@@ -102,6 +102,7 @@ 

      """

      url = get_metadata_url(profile, build)

      response = rsession.get(url)

+     response.raise_for_status()

      return response.json()

  

  

Prior to this change, if the Koji packages web server returned an HTTP error for the container build metadata.json file, we would not catch this error. The program might crash later on when parsing response.json(), or elsewhere.

Raise immediately if we get an HTTP error when downloading the metadata.json file. This makes it easier for developers to understand the root cause of a failure in this code.

Commit 22ee028 fixes this pull-request

Pull-Request has been merged by tkopecek

5 years ago

Pull-Request has been merged by tkopecek

5 years ago
Metadata