mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 02:25:18 +00:00
Disable requisites errors logging (#341)
This commit is contained in:
parent
8660737b64
commit
bc09a72f18
@ -1,7 +1,7 @@
|
||||
import { useCallback, useReducer, useRef } from 'react';
|
||||
|
||||
import { BusinessError, Destination, getDestinations as getApiDestinations } from 'checkout/backend/p2p';
|
||||
import { extractError, isNil, withRetry } from 'checkout/utils';
|
||||
import { isNil, withRetry } from 'checkout/utils';
|
||||
|
||||
type State =
|
||||
| { status: 'PRISTINE' | 'LOADING' }
|
||||
@ -74,7 +74,6 @@ export const useDestinations = (capiEndpoint: string, accessToken: string, invoi
|
||||
throw new Error('Unknown getDestinations response format.');
|
||||
} catch (error) {
|
||||
dispatch({ type: 'FETCH_FAILURE', error });
|
||||
console.error(`Failed to fetch destinations. ${extractError(error)}`);
|
||||
}
|
||||
},
|
||||
[capiEndpoint, accessToken, invoiceID, paymentID],
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useCallback, useReducer } from 'react';
|
||||
|
||||
import { BusinessError, Gateway, getGateways as getApiGateways } from 'checkout/backend/p2p';
|
||||
import { extractError, isNil, withRetry } from 'checkout/utils';
|
||||
import { isNil, withRetry } from 'checkout/utils';
|
||||
|
||||
type State =
|
||||
| { status: 'PRISTINE' | 'LOADING' }
|
||||
@ -60,7 +60,6 @@ export const useGateways = (capiEndpoint: string, accessToken: string, invoiceID
|
||||
throw new Error('Unknown getGateways response format.');
|
||||
} catch (error) {
|
||||
dispatch({ type: 'FETCH_FAILURE', error });
|
||||
console.error(`Failed to fetch gateways. ${extractError(error)}`);
|
||||
}
|
||||
}, [capiEndpoint, accessToken, invoiceID, paymentID]);
|
||||
|
||||
|
@ -64,7 +64,6 @@ export const useRequisites = (
|
||||
dispatch({ type: 'FETCH_FAILURE' });
|
||||
}
|
||||
if (gatewaysState.status === 'BUSINESS_ERROR') {
|
||||
console.error(`Failed to fetch gateways. Business Error: ${gatewaysState.error.errorMessage}`);
|
||||
dispatch({ type: 'FETCH_FAILURE' });
|
||||
}
|
||||
}, [gatewaysState]);
|
||||
@ -77,7 +76,6 @@ export const useRequisites = (
|
||||
dispatch({ type: 'FETCH_FAILURE' });
|
||||
}
|
||||
if (destinationsState.status === 'FETCH_BUSINESS_ERROR') {
|
||||
console.error(`Failed to fetch destinations. Business Error: ${destinationsState.error.errorMessage}`);
|
||||
dispatch({ type: 'FETCH_FAILURE' });
|
||||
}
|
||||
}, [destinationsState]);
|
||||
|
Loading…
Reference in New Issue
Block a user