Open burnettk opened 2 months ago
I read a bit about flask error handling and it seems to me like it's standard behavior for it to just return exceptions via responses:
When an error occurs in Flask, an appropriate HTTP status code will be returned. 400-499 indicate errors with the client’s request data, or about the data requested. 500-599 indicate errors with the server or application itself.
https://flask.palletsprojects.com/en/3.0.x/errorhandling/#error-handlers
It is possible that we need to write a custom error handler that doesn't modify the request response but does log the exception: https://flask.palletsprojects.com/en/3.0.x/api/#flask.Flask.errorhandler
Something like:
@app.errorhandler(Exception)
def exception(err):
app.logger.exception(err)
return err
Jakub saw a thing where he introduced a KeyError in logging code in connector. The service task in backend saw the key error but connector itself did not log it.