-
Bug
-
Resolution: Done
-
Normal
-
None
Using the download_pdf endpoint, an automated test attempts to download a PDF by giving a generated ID. I was expecting the response to be a 404, but the endpoint returned HTTP 400 status code instead.
Steps to reproduce:
Here is the example test code to reproduce the issue from the IQE plugin:
pdf_api = application.platform_ui.rest_client.pdf_api
fake_status_id = nonexistent_status_id()
with pytest.raises(NotFoundException) as nfe:
pdf_api.get_pdf_status(fake_status_id)
assert f"No PDF status found for {fake_status_id}" in nfe.value.body
Actual Result
The generated client receives an HTTP 400 from the endpoint and surfaces the issue as an ApiError instead of a NotFoundException. Example
E HTTP response body: {"error":{"status":400,"statusText":"PDF status could not be determined","description":"Error: TypeError: Cannot read properties of undefined (reading 'components')"}}