Added server error handling.