Updated error handling mechanisms in main.py to improve clarity and efficiency. This includes consolidating error messages and enhancing the structure of exception handling across asynchronous functions.