diff options
| author | Barry Warsaw | 2012-09-22 13:35:24 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-09-22 13:35:24 -0400 |
| commit | 7e97811156ad3fbf9daafc253a2c473b05e07542 (patch) | |
| tree | 82009bad2d877462d42cf1757d3dd96ad436d643 /src/mailman/core/errors.py | |
| parent | a8e5f267b418cd4bb577ae229fd7e22d5720e93f (diff) | |
| download | mailman-7e97811156ad3fbf9daafc253a2c473b05e07542.tar.gz mailman-7e97811156ad3fbf9daafc253a2c473b05e07542.tar.zst mailman-7e97811156ad3fbf9daafc253a2c473b05e07542.zip | |
Diffstat (limited to 'src/mailman/core/errors.py')
| -rw-r--r-- | src/mailman/core/errors.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mailman/core/errors.py b/src/mailman/core/errors.py index 529ac86fe..95a318ca6 100644 --- a/src/mailman/core/errors.py +++ b/src/mailman/core/errors.py @@ -43,7 +43,10 @@ __all__ = [ 'MemberError', 'MustDigestError', 'PasswordError', + 'RESTError', + 'ReadOnlyPATCHRequestError', 'RejectMessage', + 'UnknownPATCHRequestError', ] @@ -126,3 +129,22 @@ class BadPasswordSchemeError(PasswordError): def __str__(self): return 'A bad password scheme was given: %s' % self.scheme_name + + + +class RESTError(MailmanError): + """Base class for REST API errors.""" + + +class UnknownPATCHRequestError(RESTError): + """A PATCH request contained an unknown attribute.""" + + def __init__(self, attribute): + self.attribute = attribute + + +class ReadOnlyPATCHRequestError(RESTError): + """A PATCH request contained a read-only attribute.""" + + def __init__(self, attribute): + self.attribute = attribute |
