Reduce to debug logging in case of communication problems (#11872)
Signed-off-by: Kai Kreuzer <kai@openhab.org>pull/11875/head
parent
e9060c462b
commit
57cc935708
|
@ -117,13 +117,13 @@ public class OpenAPIUtils {
|
||||||
Throwable cause = ee.getCause();
|
Throwable cause = ee.getCause();
|
||||||
if (cause != null && cause instanceof HttpResponseException
|
if (cause != null && cause instanceof HttpResponseException
|
||||||
&& ((HttpResponseException) cause).getResponse().getStatus() == HttpStatus.UNAUTHORIZED_401) {
|
&& ((HttpResponseException) cause).getResponse().getStatus() == HttpStatus.UNAUTHORIZED_401) {
|
||||||
LOGGER.warn("OpenAPI request unauthorized. Invalid authorization token.");
|
LOGGER.debug("OpenAPI request unauthorized. Invalid authorization token.");
|
||||||
throw new NanoleafUnauthorizedException("Invalid authorization token");
|
throw new NanoleafUnauthorizedException("Invalid authorization token");
|
||||||
} else {
|
} else {
|
||||||
throw new NanoleafException("Failed to send OpenAPI request (final)", ee);
|
throw new NanoleafException("Failed to send OpenAPI request (final)", ee);
|
||||||
}
|
}
|
||||||
} catch (TimeoutException te) {
|
} catch (TimeoutException te) {
|
||||||
LOGGER.warn("OpenAPI request failed with timeout", te);
|
LOGGER.debug("OpenAPI request failed with timeout", te);
|
||||||
throw new NanoleafException("Failed to send OpenAPI request: Timeout", te);
|
throw new NanoleafException("Failed to send OpenAPI request: Timeout", te);
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
throw new NanoleafInterruptedException("OpenAPI request has been interrupted", ie);
|
throw new NanoleafInterruptedException("OpenAPI request has been interrupted", ie);
|
||||||
|
|
Loading…
Reference in New Issue