Adding server error handling.