anubhav77 commited on
Commit
3c13580
·
1 Parent(s): 8ed200b
Files changed (1) hide show
  1. src/main.py +5 -1
src/main.py CHANGED
@@ -15,6 +15,7 @@ from enum import Enum
15
  from typing import List, Dict, Any, Generator, Optional, cast, Callable
16
  from chroma_intf import *
17
  import baseInfra.dropbox_handler as dbh
 
18
 
19
  class PathRequest(BaseModel):
20
  dir: str = "/"
@@ -34,9 +35,12 @@ async def catch_exceptions_middleware(
34
  ) -> Response:
35
  try:
36
  print("In exception cater middleware")
37
- print(request)
 
38
  return await call_next(request)
39
  except Exception as e:
 
 
40
  return JSONResponse(content={"error": repr(e)}, status_code=500)
41
 
42
 
 
15
  from typing import List, Dict, Any, Generator, Optional, cast, Callable
16
  from chroma_intf import *
17
  import baseInfra.dropbox_handler as dbh
18
+ import traceback
19
 
20
  class PathRequest(BaseModel):
21
  dir: str = "/"
 
35
  ) -> Response:
36
  try:
37
  print("In exception cater middleware")
38
+ print(request.headers)
39
+ print(request.body)
40
  return await call_next(request)
41
  except Exception as e:
42
+ print(repr(e))
43
+ traceback.print_exc()
44
  return JSONResponse(content={"error": repr(e)}, status_code=500)
45
 
46