From 5398fc6058c4c12fbbaa3d47e293360b507dfbf6 Mon Sep 17 00:00:00 2001 From: Jonathan Tzeng Date: Wed, 10 Jun 2026 00:15:23 -0700 Subject: [PATCH] Stringify Exolix swap error response for readable logs Exolix's quote error handler logged the raw API error object via String(resJson), rendering it as the literal [object Object] and hiding the actual failure reason. Use JSON.stringify so the Exolix error payload is human-readable in logs. --- CHANGELOG.md | 1 + src/swap/central/exolix.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e447bd..0be2e064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - changed: Convert the build tooling from Yarn to npm. - changed: Pin ethers to exactly 5.7.0. - security: Upgrade dependencies per Socket security recommendations. +- fixed: (Exolix) Log readable JSON swap error responses instead of "[object Object]". ## 2.46.0 (2026-04-18) diff --git a/src/swap/central/exolix.ts b/src/swap/central/exolix.ts index d3105de0..68deb777 100644 --- a/src/swap/central/exolix.ts +++ b/src/swap/central/exolix.ts @@ -174,7 +174,7 @@ export function makeExolixPlugin(opts: EdgeCorePluginOptions): EdgeSwapPlugin { return resJson } - log.warn(`Error retrieving Exolix quote: ${String(resJson)}`) + log.warn(`Error retrieving Exolix quote: ${JSON.stringify(resJson)}`) throw new SwapCurrencyError(swapInfo, request) } throw new Error(`Exolix returned error code ${response.status}`)