experiment -- no name URL
This commit is contained in:
parent
e4d0662100
commit
6727aef925
2 changed files with 6 additions and 6 deletions
6
dist/bundle.es.js
vendored
6
dist/bundle.es.js
vendored
|
@ -1532,17 +1532,17 @@ function parseURI(url, requireProto = false) {
|
||||||
|
|
||||||
// Validate protocol
|
// Validate protocol
|
||||||
if (requireProto && !proto) {
|
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
|
// Validate and process name
|
||||||
if (!streamNameOrChannelName) {
|
if (!streamNameOrChannelName) {
|
||||||
throw new Error(__('URL does not include name.'));
|
throw new Error(`URL does not include name. "${url}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
rest.forEach(urlPiece => {
|
rest.forEach(urlPiece => {
|
||||||
if (urlPiece && urlPiece.includes(' ')) {
|
if (urlPiece && urlPiece.includes(' ')) {
|
||||||
throw new Error(__('URL can not include a space'));
|
throw new Error(`URL can not include a space. "${url}"`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -70,17 +70,17 @@ export function parseURI(url: string, requireProto: boolean = false): LbryUrlObj
|
||||||
|
|
||||||
// Validate protocol
|
// Validate protocol
|
||||||
if (requireProto && !proto) {
|
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
|
// Validate and process name
|
||||||
if (!streamNameOrChannelName) {
|
if (!streamNameOrChannelName) {
|
||||||
throw new Error(__('URL does not include name.'));
|
throw new Error(`URL does not include name. "${url}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
rest.forEach(urlPiece => {
|
rest.forEach(urlPiece => {
|
||||||
if (urlPiece && urlPiece.includes(' ')) {
|
if (urlPiece && urlPiece.includes(' ')) {
|
||||||
throw new Error(__('URL can not include a space'));
|
throw new Error(`URL can not include a space. "${url}"`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue