Revert "Temporarily prevent invalid get calls until we figure it out" (#1529)

This reverts commit f6f15531d4.

The root-cause was known (8dd0982f), and I don't think it worked because:
1. The issue happened at the web side which didn't have logging.
2. The `[object Promise]` came after the `get`, not before.
This commit is contained in:
infinite-persistence 2022-05-19 08:37:53 +08:00 committed by GitHub
parent bb065eb408
commit f245f09d1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 21 deletions

View file

@ -80,18 +80,7 @@ const Lbry = {
// Claim fetching and manipulation
resolve: (params) => daemonCallWithResult('resolve', params, searchRequiresAuth),
// get: (params) => daemonCallWithResult('get', params),
get: (params) => {
// $FlowFixMe
const uri = params?.uri;
if (uri && uri.endsWith('[object Promise]')) {
try {
analytics.error(`get: Invalid url (${uri})\n\`\`\`${new Error().stack}\`\`\``);
} catch {}
return Promise.reject(new Error(`get: Invalid url (${uri})`));
}
return daemonCallWithResult('get', params);
},
get: (params) => daemonCallWithResult('get', params),
claim_search: (params) => daemonCallWithResult('claim_search', params, searchRequiresAuth),
claim_list: (params) => daemonCallWithResult('claim_list', params),
channel_create: (params) => daemonCallWithResult('channel_create', params),

View file

@ -76,15 +76,7 @@ const Lbry = {
// Claim fetching and manipulation
resolve: (params) => daemonCallWithResult('resolve', params),
// get: (params) => daemonCallWithResult('get', params),
get: (params) => {
// $FlowFixMe
const uri = params?.uri;
if (uri && uri.endsWith('[object Promise]')) {
return Promise.reject(new Error(`get: Invalid url (${uri})`));
}
return daemonCallWithResult('get', params);
},
get: (params) => daemonCallWithResult('get', params),
claim_search: (params) => daemonCallWithResult('claim_search', params),
claim_list: (params) => daemonCallWithResult('claim_list', params),
channel_create: (params) => daemonCallWithResult('channel_create', params),