Skip to content

Commit

Permalink
omit exception handler for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Noza23 committed Jan 15, 2024
1 parent 03af8dd commit c0afab9
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
FastAPI,
Depends,
BackgroundTasks,
Request,
UploadFile,
File,
HTTPException,
Expand Down Expand Up @@ -264,10 +263,3 @@ async def adjust_unit(
nucls.adjust_measure_unit(mu)
await redis.set(keys.result_key(hash), nucls.model_dump_json())
return Response(status_code=200)


@app.exception_handler(404)
async def error_handler(request: Request, exc: Exception) -> Response:
"""Redirects request and exception to /error"""
return Response(b"not found", status_code=404)
# return RedirectResponse(url="/", status_code=404)

0 comments on commit c0afab9

Please sign in to comment.