From 8ff1661d365320c6e2c943927df8ff9973d9249a Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Tue, 2 May 2023 12:56:35 +0000 Subject: [PATCH] refactor: remove unused errors (#1093) as per title Co-authored-by: joel@joellee.org --- internal/models/errors.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/internal/models/errors.go b/internal/models/errors.go index d51a71708..475137195 100644 --- a/internal/models/errors.go +++ b/internal/models/errors.go @@ -11,10 +11,6 @@ func IsNotFoundError(err error) bool { return true case RefreshTokenNotFoundError, *RefreshTokenNotFoundError: return true - case InstanceNotFoundError, *InstanceNotFoundError: - return true - case TotpSecretNotFoundError, *TotpSecretNotFoundError: - return true case IdentityNotFoundError, *IdentityNotFoundError: return true case ChallengeNotFoundError, *ChallengeNotFoundError: @@ -65,13 +61,6 @@ func (e RefreshTokenNotFoundError) Error() string { return "Refresh Token not found" } -// InstanceNotFoundError represents when an instance is not found. -type InstanceNotFoundError struct{} - -func (e InstanceNotFoundError) Error() string { - return "Instance not found" -} - // FactorNotFoundError represents when a user is not found. type FactorNotFoundError struct{} @@ -86,12 +75,6 @@ func (e ChallengeNotFoundError) Error() string { return "Challenge not found" } -type TotpSecretNotFoundError struct{} - -func (e TotpSecretNotFoundError) Error() string { - return "Totp Secret not found" -} - // SSOProviderNotFoundError represents an error when a SSO Provider can't be // found. type SSOProviderNotFoundError struct{}