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) {