You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general, I think there could be a larger task in implementing central logging in Aerie CLI that could print to stdout when used in a Python package, but have a custom stream handler implemented for CLI operation that would be able to wrap logs for pretty formatting and even support flexible log levels.
cartermak
changed the title
Improve error handling
Improve Error Handling and Logging
Jul 12, 2023
The main entrypoint should catch all exceptions and gracefully exit. Because aerie-cli already has persistent file storage, we can add log files to that location and provide the full traceback there.
Anytime Aerie-CLI throws an error that we don't handle gracefully, the full stacktrace should be save to a log file somewhere. Only a short message should be printed to the terminal, instead of the full stacktrace.
At the top level (probably in main() of __main__.py), we should catch all exceptions such that the program always exists gracefully
Implement logging such that we can log debug-level, info-level, etc. from all methods in Aerie-CLI. This will include defining a top-level logger object somewhere that's accessible from all the commands and AerieClient. A custom stream handler should print pretty log messages to the terminal (using the rich library). An additional Aerie-CLI global argument can configure the logging level.
This is a general task to improve error handling and messages, including handling common special cases on a per-query basis. Examples:
TimeoutError
instead of aRuntimeError
for Hasura timeouts (common on large, complex queries)The text was updated successfully, but these errors were encountered: