add proper error handlers to the UserController class