lazr-users team mailing list archive
-
lazr-users team
-
Mailing list archive
-
Message #00008
Exporting exceptions from lazr.restful
I don't really understand how to export exceptions in lazr.restful.
In Mailman3 I have an exception called BadDomainSpecificationError,
and I've tried to declare it both of these two ways:
@error_status(400)
class BadDomainSpecificationError(MailmanError):
"""The specification of a virtual domain is invalid or
duplicated."""
class BadDomainSpecificationError(MailmanError):
"""The specification of a virtual domain is invalid or
duplicated."""
webservice_error(400)
However, when the application raises BadDomainSpecificationError, I
always get a 500 exception code. I'm using Python 2.6.
I don't really understand what the two different declarations are for.
What else am I missing to properly export this exception error code?
Thanks,
-Barry
Attachment:
PGP.sig
Description: This is a digitally signed message part
Follow ups