Compare commits

...

1 commit

Author SHA1 Message Date
infiinte-persistence 6727aef925
experiment -- no name URL 2021-08-16 20:53:58 +08:00
2 changed files with 6 additions and 6 deletions

6
dist/bundle.es.js vendored
View file

@ -1532,17 +1532,17 @@ function parseURI(url, requireProto = false) {
// Validate protocol
if (requireProto && !proto) {
throw new Error(__('LBRY URLs must include a protocol prefix (lbry://).'));
throw new Error(`LBRY URLs must include a protocol prefix (lbry://). "${url}"`);
}
// Validate and process name
if (!streamNameOrChannelName) {
throw new Error(__('URL does not include name.'));
throw new Error(`URL does not include name. "${url}"`);
}
rest.forEach(urlPiece => {
if (urlPiece && urlPiece.includes(' ')) {
throw new Error(__('URL can not include a space'));
throw new Error(`URL can not include a space. "${url}"`);
}
});

View file

@ -70,17 +70,17 @@ export function parseURI(url: string, requireProto: boolean = false): LbryUrlObj
// Validate protocol
if (requireProto && !proto) {
throw new Error(__('LBRY URLs must include a protocol prefix (lbry://).'));
throw new Error(`LBRY URLs must include a protocol prefix (lbry://). "${url}"`);
}
// Validate and process name
if (!streamNameOrChannelName) {
throw new Error(__('URL does not include name.'));
throw new Error(`URL does not include name. "${url}"`);
}
rest.forEach(urlPiece => {
if (urlPiece && urlPiece.includes(' ')) {
throw new Error(__('URL can not include a space'));
throw new Error(`URL can not include a space. "${url}"`);
}
});