From 75cea5853fca4bc96dae4aaf1168442352305b3d Mon Sep 17 00:00:00 2001 From: Viktoriia Kostyleva Date: Wed, 12 Oct 2022 16:34:16 +0300 Subject: [PATCH] #14: Throw 404 instead of 500 --- .../RouteCollections/Purchase/PurchaseRouteCollection.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Purchase/PurchaseRouteCollection.swift b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Purchase/PurchaseRouteCollection.swift index 3144af3..ed46df7 100644 --- a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Purchase/PurchaseRouteCollection.swift +++ b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Purchase/PurchaseRouteCollection.swift @@ -53,7 +53,7 @@ extension PurchaseRouteCollection { let package = offerings.flatMap { $0.availablePackages }.first(where: { $0.identifier == identifier }) guard let package = package else { - continuation.resume(throwing: Abort(.init(statusCode: 500), reason: "Failed to find package")) + continuation.resume(throwing: Abort(.badRequest)) return }