diff --git a/lib/handlers/quote/quote.ts b/lib/handlers/quote/quote.ts index 20586b1cc..78876b6fa 100644 --- a/lib/handlers/quote/quote.ts +++ b/lib/handlers/quote/quote.ts @@ -126,6 +126,16 @@ export class QuoteHandler extends APIGLambdaHandler< 1, MetricLoggerUnit.Count ) + log.error( + { + statusCode: result?.statusCode, + errorCode: result?.errorCode, + detail: result?.detail, + }, + `Quote 5XX Error [${result?.statusCode}] on ${ID_TO_NETWORK_NAME(chainId)} with errorCode '${ + result?.errorCode + }': ${result?.detail}` + ) break } } catch (err) { @@ -140,6 +150,8 @@ export class QuoteHandler extends APIGLambdaHandler< MetricLoggerUnit.Count ) + log.error(`Quote 5XX Error on ${ID_TO_NETWORK_NAME(chainId)} with exception '${err}'`) + throw err } finally { // This metric is logged after calling the internal handler to correlate with the status metrics