experiment -- no name URL

This commit is contained in:
infiinte-persistence 2021-08-16 20:53:58 +08:00
parent e4d0662100
commit 6727aef925
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
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}"`);
}
});