Added feature to notify errors based on the response