Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
allow any 2XX status code from an external JSON server (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles authored and ggalmazor committed Nov 19, 2019
1 parent 3e3b04d commit f79b900
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f79b900

Please sign in to comment.