From f79b90004c97e116a4d0e9bac821310106757294 Mon Sep 17 00:00:00 2001 From: Terence Honles Date: Tue, 19 Nov 2019 08:58:20 -0800 Subject: [PATCH] allow any 2XX status code from an external JSON server (#469) --- .../org/opendatakit/aggregate/externalservice/JsonServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opendatakit/aggregate/externalservice/JsonServer.java b/src/main/java/org/opendatakit/aggregate/externalservice/JsonServer.java index eaac6341e8..5088878210 100644 --- a/src/main/java/org/opendatakit/aggregate/externalservice/JsonServer.java +++ b/src/main/java/org/opendatakit/aggregate/externalservice/JsonServer.java @@ -134,7 +134,7 @@ private void sendRequest(String url, HttpEntity postBody, CallingContext cc) } if (statusCode == HttpServletResponse.SC_UNAUTHORIZED) { throw new ODKExternalServiceCredentialsException(reason + " (" + statusCode + ")"); - } else if (statusCode != HttpServletResponse.SC_OK) { + } else if (statusCode < HttpServletResponse.SC_OK || statusCode >= 300) { throw new ODKExternalServiceException(reason + " (" + statusCode + ")"); } } catch (ODKExternalServiceException e) {