Added support for new errors inside some helper function for the AmiiboLiveClient type in the library target.

This commit is contained in:
2025-10-07 23:58:47 +02:00
parent 2c66c3940c
commit cb70e86a66
@@ -202,6 +202,10 @@ private extension AmiiboLiveClient {
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .notFound:
throw AmiiboServiceError.notFound
case .internalServerError:
throw AmiiboServiceError.notAvailable
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
@@ -365,6 +369,12 @@ private extension AmiiboLiveClient {
case let .json(output):
return output.lastUpdated
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .notFound:
throw AmiiboServiceError.notFound
case .internalServerError:
throw AmiiboServiceError.notAvailable
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}