Skip to content

Commit

Permalink
#14: Throw 404 instead of 500
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoriaKostyleva committed Oct 12, 2022
1 parent f51588d commit 75cea58
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 75cea58

Please sign in to comment.