* Refactored two error handlers