Commit a2a4236e by Oleksandr Barabash

logging minor fixes

parent 964a2988
...@@ -86,10 +86,10 @@ async def v1_get_initiations(request: Request) -> Response: ...@@ -86,10 +86,10 @@ async def v1_get_initiations(request: Request) -> Response:
id=init.id) for init in inits]) id=init.id) for init in inits])
return Response(body=json.dumps(data), status=HTTPStatus.OK) return Response(body=json.dumps(data), status=HTTPStatus.OK)
except ItemNotFound as e: except ItemNotFound as e:
print("ItemNotFound:", e) Log.e(TAG, "v1_get_initiations::item not found", e)
return Response(status=HTTPStatus.NOT_FOUND) return Response(status=HTTPStatus.NOT_FOUND)
except Exception as e: except Exception as e:
print("error:", e) Log.e(TAG, "v1_get_initiations::exception", sys.exc_info())
return Response(status=HTTPStatus.BAD_REQUEST) return Response(status=HTTPStatus.BAD_REQUEST)
...@@ -111,8 +111,8 @@ async def v1_get_notification(request: Request) -> Response: ...@@ -111,8 +111,8 @@ async def v1_get_notification(request: Request) -> Response:
except ItemNotFound as e: except ItemNotFound as e:
Log.e(TAG, "v1_get_notification::item not found", e) Log.e(TAG, "v1_get_notification::item not found", e)
return Response(status=HTTPStatus.NOT_FOUND) return Response(status=HTTPStatus.NOT_FOUND)
except Exception as e: except Exception:
Log.e(TAG, exc_info=e) Log.e(TAG, exc_info=sys.exc_info())
return Response(status=HTTPStatus.BAD_REQUEST) return Response(status=HTTPStatus.BAD_REQUEST)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment