From 55b5987e0ca2c30647bdaa4409eb92d7cd868222 Mon Sep 17 00:00:00 2001 From: Andrew Edwards Date: Thu, 28 Feb 2019 15:00:12 -0500 Subject: [PATCH] Increased max size for decoding. --- Sources/Stripe/API/StripeRequest.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Stripe/API/StripeRequest.swift b/Sources/Stripe/API/StripeRequest.swift index 6997a35..baa8971 100644 --- a/Sources/Stripe/API/StripeRequest.swift +++ b/Sources/Stripe/API/StripeRequest.swift @@ -25,12 +25,12 @@ public extension StripeRequest { decoder.dateDecodingStrategy = .secondsSince1970 guard response.status == .ok else { - return try decoder.decode(StripeError.self, from: response, maxSize: 65_536, on: worker).map(to: SM.self){ error in + return try decoder.decode(StripeError.self, from: response, maxSize: 1_000_000, on: worker).map(to: SM.self){ error in throw error } } - return try decoder.decode(SM.self, from: response, maxSize: 65_536, on: worker) + return try decoder.decode(SM.self, from: response, maxSize: 1_000_000, on: worker) } }