Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 1ea0abe

Browse files
Authv2 / handle 404 in Subscription API request (#1203)
Task/Issue URL: https://app.asana.com/0/1205842942115003/1209234087255045/f What kind of version bump will this require?: None **Description**: `/subscription` API request now can handle both 400 and 404 as a "no subscription available" instead than only 400.
1 parent 05cfe11 commit 1ea0abe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Subscription/API/SubscriptionEndpointServiceV2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public struct DefaultSubscriptionEndpointServiceV2: SubscriptionEndpointServiceV
114114
Logger.subscriptionEndpointService.log("Subscription details retrieved successfully: \(subscription.debugDescription, privacy: .public)")
115115
return try await storeAndAddFeaturesIfNeededTo(subscription: subscription)
116116
} else {
117-
if statusCode == .badRequest {
117+
if statusCode == .badRequest || statusCode == .notFound {
118118
Logger.subscriptionEndpointService.log("No subscription found")
119119
clearSubscription()
120120
throw SubscriptionEndpointServiceError.noData

0 commit comments

Comments
 (0)