diff --git a/PayfritBeacon/Services/APIClient.swift b/PayfritBeacon/Services/APIClient.swift index 7bea61e..4a74986 100644 --- a/PayfritBeacon/Services/APIClient.swift +++ b/PayfritBeacon/Services/APIClient.swift @@ -201,8 +201,8 @@ actor APIClient { guard resp.OK else { throw APIError.serverError(resp.MESSAGE ?? resp.ERROR ?? "Failed to allocate minor") } - guard let minor = resp.BeaconMinor, minor > 0 else { - throw APIError.serverError("API returned invalid minor value: \(resp.BeaconMinor ?? 0). Service point may not be configured correctly.") + guard let minor = resp.BeaconMinor, minor >= 0 else { + throw APIError.serverError("API returned invalid minor value: \(resp.BeaconMinor.map(String.init) ?? "nil"). Service point may not be configured correctly.") } return minor }