Skip to content

Commit

Permalink
Reduce to debug logging in case of communication problems (openhab#11872
Browse files Browse the repository at this point in the history
)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and moesterheld committed Jan 18, 2022
1 parent d9775c1 commit fdbb090
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ public static ContentResponse sendOpenAPIRequest(Request request) throws Nanolea
Throwable cause = ee.getCause();
if (cause != null && cause instanceof HttpResponseException
&& ((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");
} else {
throw new NanoleafException("Failed to send OpenAPI request (final)", ee);
}
} 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);
} catch (InterruptedException ie) {
throw new NanoleafInterruptedException("OpenAPI request has been interrupted", ie);
Expand Down

0 comments on commit fdbb090

Please sign in to comment.