diff --git a/lbry/error/README.md b/lbry/error/README.md index 2295ad8b9..09352b52f 100644 --- a/lbry/error/README.md +++ b/lbry/error/README.md @@ -51,11 +51,12 @@ Code | Name | Message 405 | ChannelKeyNotFound | Channel signing key not found. 406 | ChannelKeyInvalid | Channel signing key is out of date. -- For example, channel was updated but you don't have the updated key. 407 | DataDownload | Failed to download blob. *generic* -408 | Resolve | Failed to resolve '{url}'. -409 | ResolveTimeout | Failed to resolve '{url}' within the timeout. -410 | KeyFeeAboveMaxAllowed | {message} -411 | InvalidPassword | Password is invalid. -412 | IncompatibleWalletServer | '{server}:{port}' has an incompatibly old version. +410 | Resolve | Failed to resolve '{url}'. +411 | ResolveTimeout | Failed to resolve '{url}' within the timeout. +411 | ResolveCensored | Resolve of '{url}' was censored by channel with claim id '{censor_id}'. +420 | KeyFeeAboveMaxAllowed | {message} +421 | InvalidPassword | Password is invalid. +422 | IncompatibleWalletServer | '{server}:{port}' has an incompatibly old version. **5xx** | Blob | **Blobs** 500 | BlobNotFound | Blob not found. 501 | BlobPermissionDenied | Permission denied to read blob. diff --git a/lbry/error/__init__.py b/lbry/error/__init__.py index 567b3cb17..66247f4e0 100644 --- a/lbry/error/__init__.py +++ b/lbry/error/__init__.py @@ -197,6 +197,12 @@ class ResolveTimeoutError(WalletError): super().__init__(f"Failed to resolve '{url}' within the timeout.") +class ResolveCensoredError(WalletError): + + def __init__(self, url, censor_id): + super().__init__(f"Resolve of '{url}' was censored by channel with claim id '{censor_id}'.") + + class KeyFeeAboveMaxAllowedError(WalletError): def __init__(self, message): diff --git a/lbry/error/generate.py b/lbry/error/generate.py index 3d28b0008..9c1cef501 100644 --- a/lbry/error/generate.py +++ b/lbry/error/generate.py @@ -50,7 +50,7 @@ class ErrorClass: def get_arguments(self): args = ['self'] - for arg in re.findall('{([a-z0-1]+)}', self.message): + for arg in re.findall('{([a-z0-1_]+)}', self.message): args.append(arg) return args