protected override FirebaseAuthException CreateException(FirebaseExceptionArgs args)
 {
     return(new FirebaseAuthException(
                args.Code,
                args.Message,
                (args as FirebaseAuthExceptionArgs).AuthErrorCode,
                response: args.HttpResponse));
 }
 protected override FirebaseAuthException CreateException(FirebaseExceptionArgs args)
 {
     return(new FirebaseAuthException(
                args.Code,
                args.Message,
                AuthErrorCode.CertificateFetchFailed,
                response: args.HttpResponse));
 }
Пример #3
0
 protected override FirebaseMessagingException CreateException(FirebaseExceptionArgs args)
 {
     return(new FirebaseMessagingException(
                args.Code,
                args.Message,
                this.GetMessagingErrorCode(args.ResponseBody),
                response: args.HttpResponse));
 }
Пример #4
0
            protected override FirebaseMessagingException CreateException(FirebaseExceptionArgs args)
            {
                var errorCode = this.GetErrorCode(args.ResponseBody);
                var message   = args.Message;

                if (!string.IsNullOrEmpty(errorCode))
                {
                    message = $"Error while calling the IID service: {errorCode}";
                }

                return(new FirebaseMessagingException(
                           args.Code,
                           message,
                           null,
                           response: args.HttpResponse));
            }
Пример #5
0
 /// <summary>
 /// Creates a new <see cref="FirebaseException"/> from the specified arguments.
 /// </summary>
 /// <param name="args">A <see cref="FirebaseExceptionArgs"/> instance containing error
 /// code, message and other details.</param>
 /// <returns>A <see cref="FirebaseException"/> object.</returns>
 protected virtual FirebaseException CreateException(FirebaseExceptionArgs args)
 {
     return(new FirebaseException(args.Code, args.Message, response: args.HttpResponse));
 }
 /// <summary>
 /// Creates a new <see cref="FirebaseException"/> from the specified arguments.
 /// </summary>
 /// <param name="args">A <see cref="FirebaseExceptionArgs"/> instance containing error
 /// code, message and other details.</param>
 /// <returns>A <see cref="FirebaseException"/> object.</returns>
 protected abstract T CreateException(FirebaseExceptionArgs args);