Added a callback for service errors.