We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ef9f77 commit bd6335dCopy full SHA for bd6335d
1 file changed
root/app/api.py
@@ -26,7 +26,8 @@ async def get_status():
26
async def health():
27
try:
28
content = await get_status()
29
- return JSONResponse(content=content)
+ status_code = 200 if content == "Success" else 500
30
+ return JSONResponse(content=content, status_code=status_code)
31
except Exception:
32
print(traceback.format_exc())
33
raise HTTPException(status_code=404, detail="Not found")
0 commit comments