Example #1
0
        protected CMPShareError PrepareGraphErrorFromResponse(HttpStatusCode statusCode, string responseTextString)
        {
            var responseError = new CMPShareError()
            {
                ErrorCode          = (int)statusCode,
                ErrorMessageString = responseTextString,
                UserMessageString  = responseTextString
            };

            return(responseError);
        }
Example #2
0
        protected CMPShareError PrepareGraphErrorFromException(Exception exception)
        {
            var responseError = new CMPShareError()
            {
                ErrorCode          = 0,
                ErrorMessageString = exception?.Message,
                UserMessageString  = exception?.InnerException?.Message
            };

            return(responseError);
        }
        private void OnAuthenticationError(object sender, AuthenticatorErrorEventArgs e)
        {
            var authenticationError = new CMPShareError()
            {
                ErrorCode          = 0,
                ErrorMessageString = e.Message,
                UserMessageString  = e.Exception?.InnerException?.Message
            };

            _authenticationTask.TrySetResult(new Tuple <bool, CMPShareError>(false, authenticationError));
        }