Skip to content

Commit

Permalink
Merge branch 'jens/piv-pin-error-handling'
Browse files Browse the repository at this point in the history
  • Loading branch information
jensutbult committed Jun 25, 2024
2 parents 8b4ddca + 40fdf84 commit 776c896
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions YubiKit/YubiKit/PIV/PIVSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,7 @@ public final actor PIVSession: Session, InternalSession {
} catch {
guard let responseError = error as? ResponseError else { throw error }
guard responseError.responseStatus.status != .referencedDataNotFound else { throw SessionError.notSupported }
let retries = retriesFrom(responseError: responseError)
if retries >= 0 {
throw SessionError.invalidPin(retries)
} else {
// Status code returned error, not number of retries
throw error
}
throw error
}
}
}
Expand Down

0 comments on commit 776c896

Please sign in to comment.