add best practices to global error handling