Temporarily prevent invalid get
calls until we figure it out
No analytics for the server side.
This commit is contained in:
parent
e0fee8cb25
commit
f6f15531d4
2 changed files with 21 additions and 2 deletions
13
ui/lbry.js
13
ui/lbry.js
|
@ -80,7 +80,18 @@ const Lbry = {
|
||||||
|
|
||||||
// Claim fetching and manipulation
|
// Claim fetching and manipulation
|
||||||
resolve: (params) => daemonCallWithResult('resolve', params, searchRequiresAuth),
|
resolve: (params) => daemonCallWithResult('resolve', params, searchRequiresAuth),
|
||||||
get: (params) => daemonCallWithResult('get', params),
|
// 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);
|
||||||
|
},
|
||||||
claim_search: (params) => daemonCallWithResult('claim_search', params, searchRequiresAuth),
|
claim_search: (params) => daemonCallWithResult('claim_search', params, searchRequiresAuth),
|
||||||
claim_list: (params) => daemonCallWithResult('claim_list', params),
|
claim_list: (params) => daemonCallWithResult('claim_list', params),
|
||||||
channel_create: (params) => daemonCallWithResult('channel_create', params),
|
channel_create: (params) => daemonCallWithResult('channel_create', params),
|
||||||
|
|
10
web/lbry.js
10
web/lbry.js
|
@ -76,7 +76,15 @@ const Lbry = {
|
||||||
|
|
||||||
// Claim fetching and manipulation
|
// Claim fetching and manipulation
|
||||||
resolve: (params) => daemonCallWithResult('resolve', params),
|
resolve: (params) => daemonCallWithResult('resolve', params),
|
||||||
get: (params) => daemonCallWithResult('get', 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);
|
||||||
|
},
|
||||||
claim_search: (params) => daemonCallWithResult('claim_search', params),
|
claim_search: (params) => daemonCallWithResult('claim_search', params),
|
||||||
claim_list: (params) => daemonCallWithResult('claim_list', params),
|
claim_list: (params) => daemonCallWithResult('claim_list', params),
|
||||||
channel_create: (params) => daemonCallWithResult('channel_create', params),
|
channel_create: (params) => daemonCallWithResult('channel_create', params),
|
||||||
|
|
Loading…
Reference in a new issue