diff --git a/packages/network-support/src/fetch.ts b/packages/network-support/src/fetch.ts index 53468e50..0071f0e0 100644 --- a/packages/network-support/src/fetch.ts +++ b/packages/network-support/src/fetch.ts @@ -115,7 +115,7 @@ export function createFetch( const after = Date.now(); httpVersion = Number(_res.headers.get('httpVersion')) || 1; - let res: object; + let res: object | undefined; if (type === OrderType.flexPlan) { [res] = orderManager.extractChannelState( await _res.text(), @@ -153,6 +153,15 @@ export function createFetch( Number(_res.headers.get('Content-Length')) || 1 ); + if (_res.status !== 200 && type === OrderType.fallback) { + logger?.info({ + type: 'fallbackDetail', + body: JSON.stringify(body), + res: JSON.stringify(res), + rid, + }); + } + return { status: _res.status, headers: _res.headers,