diff --git a/bundles/org.smarthomej.binding.http/src/main/java/org/smarthomej/binding/http/internal/http/HttpResponseListener.java b/bundles/org.smarthomej.binding.http/src/main/java/org/smarthomej/binding/http/internal/http/HttpResponseListener.java index a942f1b1e3..47d9f69226 100644 --- a/bundles/org.smarthomej.binding.http/src/main/java/org/smarthomej/binding/http/internal/http/HttpResponseListener.java +++ b/bundles/org.smarthomej.binding.http/src/main/java/org/smarthomej/binding/http/internal/http/HttpResponseListener.java @@ -63,7 +63,7 @@ public void onComplete(Result result) { logger.trace("Received from '{}': {}", result.getRequest().getURI(), responseToLogString(response)); } Request request = result.getRequest(); - if (result.isFailed()) { + if (response == null || (result.isFailed() && response.getStatus() != 401)) { logger.debug("Requesting '{}' (method='{}', content='{}') failed: {}", request.getURI(), request.getMethod(), request.getContent(), result.getFailure().getMessage()); future.complete(null);