Skip to content

Commit

Permalink
Fix error code when resource is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed May 9, 2024
1 parent 88f71d1 commit 8fda295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jeremymfastapiexample/handlers/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def get_schema(
response = await http_client.get(schema_url)
except httpx.RequestError as e:
raise HTTPException(
status_code=200, detail=f"URL not found\n{schema_url}"
status_code=404, detail=f"URL not found\n{schema_url}"
) from e
data: dict[str, Any] = yaml.safe_load(response.text)
return Schema(**data)

0 comments on commit 8fda295

Please sign in to comment.