Beispiel #1
0
        private string getErrorMessage(ReponseErrorType errorType)
        {
            switch (errorType)
            {
            case ReponseErrorType.USER_NOT_FOUND: return("User not found");

            case ReponseErrorType.INVALID_PASSWORD: return("Invalid password");

            case ReponseErrorType.INVALID_REFRESH_TOKEN: return("Invalid refresh token");

            default: return("Unknown error");
            }
        }
Beispiel #2
0
 public Error(ReponseErrorType errorType)
 {
     this.ErrorCode = (int)errorType;
     this.Message   = getErrorMessage(errorType);
 }
Beispiel #3
0
 public void SetError(ReponseErrorType errorType)
 {
     this.OK    = false;
     this.Error = new Error(errorType);
 }