The general exception handler returns the full exception message to the client. This can leak sensitive internal implementation details, which is a security risk. It's better to log the detailed error on the server (using exc_info=True for the full stack trace) and return a generic error message to the client.