Revert "Log which method caused Failed to fetch"

This reverts commit 36a63e27c1.

Probably a bad idea, too many
This commit is contained in:
infinite-persistence 2022-03-19 07:31:01 +08:00
parent 7e605f60a2
commit c4d6fa9ff0
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -1,5 +1,4 @@
// @flow // @flow
import analytics from 'analytics';
import { NO_AUTH, X_LBRY_AUTH_TOKEN } from 'constants/token'; import { NO_AUTH, X_LBRY_AUTH_TOKEN } from 'constants/token';
require('proxy-polyfill'); require('proxy-polyfill');
@ -247,12 +246,7 @@ export function apiCall(method: string, params: ?{}, resolve: Function, reject:
const error = response.error || (response.result && response.result.error); const error = response.error || (response.result && response.result.error);
return error ? reject(error) : resolve(response.result); return error ? reject(error) : resolve(response.result);
}) })
.catch((err) => { .catch(reject);
if (err.message === 'Failed to fetch') {
analytics.error(`\`${method}\`: Failed to fetch`);
}
return reject(err);
});
} }
function daemonCallWithResult( function daemonCallWithResult(