Map wrapped cancellation in the Amiibo live client to the cancelled error.

This commit is contained in:
javier committed 2026-10-25 19:29:23 +01:00
1 parent 44bfaca553
commit 51b1245ec3
4 files changed
+102 -2

No files matched your search

@@ -370,7 +370,10 @@ private extension AmiiboLiveClient {
case is CancellationError:
throw AmiiboServiceError.cancelled
case let clientError as ClientError:
// The underlying client wraps every error, including cancellation, in a `ClientError`.
switch clientError.underlyingError {
case is CancellationError:
throw AmiiboServiceError.cancelled
case is DecodingError:
throw AmiiboServiceError.decoding
case let urlError as URLError: