Spaces:
Runtime error
Runtime error
v0.1.8.2
Browse files- src/main.py +4 -1
src/main.py
CHANGED
@@ -33,6 +33,8 @@ async def catch_exceptions_middleware(
|
|
33 |
request: Request, call_next: Callable[[Request], Any]
|
34 |
) -> Response:
|
35 |
try:
|
|
|
|
|
36 |
return await call_next(request)
|
37 |
except Exception as e:
|
38 |
return JSONResponse(content={"error": repr(e)}, status_code=500)
|
@@ -64,7 +66,8 @@ async def add_text_document(inDoc: DocWithMeta ) -> Any:
|
|
64 |
"""
|
65 |
Add text and metadata to the db
|
66 |
"""
|
67 |
-
|
|
|
68 |
return addText(inDoc.text,inDoc.metadata)
|
69 |
|
70 |
@app.get(api_base+"/persist")
|
|
|
33 |
request: Request, call_next: Callable[[Request], Any]
|
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)
|
|
|
66 |
"""
|
67 |
Add text and metadata to the db
|
68 |
"""
|
69 |
+
print("Received request for")
|
70 |
+
print(inDoc)
|
71 |
return addText(inDoc.text,inDoc.metadata)
|
72 |
|
73 |
@app.get(api_base+"/persist")
|