Skip to content

Commit

Permalink
chore: fix return on PublicKeyProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
descorp authored and robertdalmeida committed Mar 11, 2024
1 parent 4c39940 commit 3d5f181
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Adyen/Utilities/PublicKeyProvider/PublicKeyProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public final class PublicKeyProvider: AnyPublicKeyProvider {
completion(.success(response.cardPublicKey))
case let .failure(error):
if error is DecodingError {
completion(.failure(Error.invalidClientKey))
// Disclaimer: This error check is not 100% reliable. Need to improve the endpoint.
return completion(.failure(Error.invalidClientKey))
}
completion(.failure(error))
}
Expand Down

0 comments on commit 3d5f181

Please sign in to comment.