Throw exception when the CancellationToken is cancelled as soon as possible #70
Labels
BREAKING CHANGE
Breaking change that involves increasing the major version number
enhancement
New feature or request
good first issue
Good for newcomers
Milestone
In V6 or earlier, we rely on framework code (mainly
System.Text.Json
or theHttpClient
) to throw an exception when a suppliedCancellationToken
is cancelled. I think it's good form to cancel as early as possible, so we should add acancellationToken.ThrowIfCancellationRequested()
to ourHaveIBeenPwnedClient.*Internal()
methods after any argument and disposal checks.TaskCanceledException
instead ofOperationCanceledException
. I have no idea if theHttpClient
orSystem.Text.Json
have usedTaskCanceledException
in the past.The text was updated successfully, but these errors were encountered: