From 9ecc1125abf17efff8fbc4c5ba2d9661397eb772 Mon Sep 17 00:00:00 2001 From: jsetton Date: Sat, 26 Oct 2024 21:02:54 -0400 Subject: [PATCH] Increase non-http status request error log level Signed-off-by: jsetton --- lambda/alexa/smarthome/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda/alexa/smarthome/index.js b/lambda/alexa/smarthome/index.js index 29f9c952..c4eb4ca5 100644 --- a/lambda/alexa/smarthome/index.js +++ b/lambda/alexa/smarthome/index.js @@ -80,7 +80,7 @@ const logError = (error, directive) => { // Define log level channel and error message based on error type if (error instanceof AxiosError) { - level = 'warn'; + level = error.response?.status ? 'warn' : 'error'; message = `RequestError: ${error.message}`; } else { level = 'error';