Improving HTTP Response code to be more standard.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@146776 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-04-11 17:42:23 +00:00
parent ee4b037c96
commit b16e6cf039
1 changed files with 2 additions and 2 deletions

View File

@ -226,13 +226,13 @@ public class HTTPCall {
if(responseCode == HttpURLConnection.HTTP_NOT_FOUND){
throw getElementNotFoundException(clz);
}
if(responseCode == HttpURLConnection.HTTP_CONFLICT){
if(responseCode == HttpURLConnection.HTTP_FORBIDDEN){
throw getElementAvailableInAnotherContextException(clz);
}
}
if (responseCode != HttpURLConnection.HTTP_OK) {
if (responseCode >= HttpURLConnection.HTTP_BAD_REQUEST) {
InputStream inputStream = connection.getErrorStream();
StringBuilder result = getStringBuilder(inputStream);