Add logging for REST errors.