From ec05d07974fd197db57ef959039dab6b78e7d2fa Mon Sep 17 00:00:00 2001 From: LeeGordon83 Date: Mon, 19 Jan 2026 12:40:27 +0000 Subject: [PATCH] Log full error object to debug 407 proxy issue - Log error directly instead of JSON.stringify - Log error keys and cause separately - Use getOwnPropertyNames to see all error properties --- src/lib/flood-service.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib/flood-service.js b/src/lib/flood-service.js index 98833ad..9895028 100644 --- a/src/lib/flood-service.js +++ b/src/lib/flood-service.js @@ -54,14 +54,15 @@ export async function getStation (stationId) { console.log(`No station items found for ${stationId}`) return null } catch (error) { - console.error(`Error fetching station from ${url}:`, JSON.stringify({ - name: error.name, - message: error.message, - cause: error.cause, - code: error.code, - errno: error.errno, - syscall: error.syscall - }, null, 2)) + // Log everything on the error object + console.error(`Error fetching station from ${url}:`) + console.error('Error details:', error) + console.error('Error keys:', Object.keys(error)) + console.error('Error cause:', error.cause) + if (error.cause) { + console.error('Cause keys:', Object.keys(error.cause)) + console.error('Cause details:', JSON.stringify(error.cause, Object.getOwnPropertyNames(error.cause))) + } return null } }