Reduce to debug logging in case of communication problems (#11872)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
pull/11875/head
Kai Kreuzer 2021-12-28 11:17:57 +01:00 committed by GitHub
parent e9060c462b
commit 57cc935708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);