refactor: log NO_ROUTE found instead of paging (#7242)
* refactor: log no route found instead of paging * typo * log router preference --------- Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
This commit is contained in:
parent
bed144b994
commit
1eab4291f6
@ -1,7 +1,7 @@
|
||||
import { createApi, fetchBaseQuery, FetchBaseQueryError } from '@reduxjs/toolkit/query/react'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { Protocol } from '@uniswap/router-sdk'
|
||||
import { TradeType } from '@uniswap/sdk-core'
|
||||
import { sendAnalyticsEvent } from 'analytics'
|
||||
import { isUniswapXSupportedChain } from 'constants/chains'
|
||||
import { getClientSideQuote } from 'lib/hooks/routing/clientSideSmartOrderRouter'
|
||||
import ms from 'ms'
|
||||
@ -166,10 +166,10 @@ export const routingApi = createApi({
|
||||
typeof errorData === 'object' &&
|
||||
(errorData?.errorCode === 'NO_ROUTE' || errorData?.detail === 'No quotes available')
|
||||
) {
|
||||
Sentry.withScope((scope) => {
|
||||
scope.setExtra('requestBody', requestBody)
|
||||
scope.setExtra('response', response)
|
||||
Sentry.captureException(new Error("No routes found for user's quote request, alert Routing Team"))
|
||||
sendAnalyticsEvent('No quote received from routing API', {
|
||||
requestBody,
|
||||
response,
|
||||
routerPreference: args.routerPreference,
|
||||
})
|
||||
return {
|
||||
data: { state: QuoteState.NOT_FOUND, latencyMs: getQuoteLatencyMeasure(quoteStartMark).duration },
|
||||
|
Loading…
Reference in New Issue
Block a user