Skip to content

Commit 2e0e45e

Browse files
authored
chore(auth): remove unknown default enum case from error mapping (#2614)
1 parent 9d3d0b3 commit 2e0e45e

19 files changed

+0
-38
lines changed

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/ChangePasswordOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ extension ChangePasswordOutputError: AuthErrorConvertible {
5858
case .forbiddenException(let forbiddenException):
5959
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
6060
AuthPluginErrorConstants.forbiddenError)
61-
@unknown default:
62-
return .unknown("Unknown service error occurred")
6361
}
6462
}
6563
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/ConfirmForgotPasswordOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ extension ConfirmForgotPasswordOutputError: AuthErrorConvertible {
7676
case .forbiddenException(let forbiddenException):
7777
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
7878
AuthPluginErrorConstants.forbiddenError)
79-
@unknown default:
80-
return .unknown("Unknown service error occurred")
8179
}
8280
}
8381
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/ConfirmSignUpOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ extension ConfirmSignUpOutputError: AuthErrorConvertible {
115115
case .forbiddenException(let forbiddenException):
116116
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
117117
AuthPluginErrorConstants.forbiddenError)
118-
@unknown default:
119-
return .unknown("Unknown service error occurred")
120118
}
121119
}
122120

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/DeleteUserOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ extension DeleteUserOutputError: AuthErrorConvertible {
5050
case .forbiddenException(let forbiddenException):
5151
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
5252
AuthPluginErrorConstants.forbiddenError)
53-
@unknown default:
54-
return .unknown("Unknown service error occurred")
5553
}
5654
}
5755
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/ForgetDeviceOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ extension ForgetDeviceOutputError: AuthErrorConvertible {
5353
case .forbiddenException(let forbiddenException):
5454
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
5555
AuthPluginErrorConstants.forbiddenError)
56-
@unknown default:
57-
return .unknown("Unknown service error occurred")
5856
}
5957
}
6058
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/ForgotPasswordOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ extension ForgotPasswordOutputError: AuthErrorConvertible {
8585
case .forbiddenException(let forbiddenException):
8686
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
8787
AuthPluginErrorConstants.forbiddenError)
88-
@unknown default:
89-
return .unknown("Unknown service error occurred")
9088
}
9189
}
9290
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/GetCredentialsForIdentityOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ extension GetCredentialsForIdentityOutputError: AuthErrorConvertible {
4545
let statusCode = unknownAWSHttpServiceError._statusCode?.rawValue ?? -1
4646
let message = unknownAWSHttpServiceError._message ?? ""
4747
return .unknown("Unknown service error occurred with status \(statusCode) \(message)")
48-
@unknown default:
49-
return .unknown("Unknown service error occurred")
5048
}
5149
}
5250
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/GetIdOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ extension GetIdOutputError: AuthErrorConvertible {
4646
let statusCode = unknownAWSHttpServiceError._statusCode?.rawValue ?? -1
4747
let message = unknownAWSHttpServiceError._message ?? ""
4848
return .unknown("Unknown service error occurred with status \(statusCode) \(message)")
49-
@unknown default:
50-
return .unknown("Unknown service error occurred")
5149
}
5250
}
5351

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/GetUserAttributeVerificationCodeOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ extension GetUserAttributeVerificationCodeOutputError: AuthErrorConvertible {
8282
case .forbiddenException(let forbiddenException):
8383
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
8484
AuthPluginErrorConstants.forbiddenError)
85-
@unknown default:
86-
return .unknown("Unknown service error occurred")
8785
}
8886
}
8987

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/GetUserOutputError+AuthError.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ extension GetUserOutputError: AuthErrorConvertible {
5050
case .forbiddenException(let forbiddenException):
5151
return .service(forbiddenException.message ?? "Access to the requested resource is forbidden",
5252
AuthPluginErrorConstants.forbiddenError)
53-
@unknown default:
54-
return .unknown("Unknown service error occurred")
5553
}
5654
}
5755

0 commit comments

Comments
 (0)