chore: handle positions with market data errors - fix use of error policy

This commit is contained in:
maciek
2023-02-08 17:47:45 +01:00
parent c99b38fa34
commit aedfdee870
@@ -330,7 +330,7 @@ function makeDataProviderInternal<
});
try {
const res = (await call().catch((err) => {
const res = await call().catch((err) => {
if (
err.graphQLErrors &&
isOnlyMarketDataNotFoundErrors(err.graphQLErrors, ['market', 'data'])
@@ -339,7 +339,7 @@ function makeDataProviderInternal<
} else {
throw err;
}
}));
});
data = getData(res.data, variables);
if (data && pagination) {
if (!(data instanceof Array)) {