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"); } }
public Error(ReponseErrorType errorType) { this.ErrorCode = (int)errorType; this.Message = getErrorMessage(errorType); }
public void SetError(ReponseErrorType errorType) { this.OK = false; this.Error = new Error(errorType); }