Send back developer error correctly

This commit is contained in:
Adil Hafeez 2024-10-17 20:52:04 -07:00
parent 6cd05572c4
commit b18c8d313c
3 changed files with 32 additions and 12 deletions

View file

@ -1,3 +1,4 @@
from fastapi import FastAPI, HTTPException
import json
import random
from fastapi import FastAPI, Response
@ -45,7 +46,8 @@ async def weather(req: WeatherRequest, res: Response):
}
)
return weather_forecast
raise HTTPException(status_code=404, detail="some error")
# return weather_forecast
class InsuranceClaimDetailsRequest(BaseModel):