Merge pull request #5462 from osmandapp/fix_5454

Fix #5454
This commit is contained in:
Alexey 2018-05-22 18:36:27 +03:00 committed by GitHub
commit 7467ca8752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,12 @@ public class OsmBugsRemoteUtil implements OsmBugsUtil {
log.info(msg); //$NON-NLS-1$
// populate return fields.
StringBuilder responseBody = Algorithms.readFromInputStream(connection.getInputStream());
StringBuilder responseBody;
if (connection.getResponseCode() == HttpURLConnection.HTTP_CONFLICT) {
responseBody = Algorithms.readFromInputStream(connection.getErrorStream());
} else {
responseBody = Algorithms.readFromInputStream(connection.getInputStream());
}
log.info("Response : " + responseBody); //$NON-NLS-1$
connection.disconnect();
if (!ok) {