mirror of https://github.com/zulip/zulip.git
c3caa3ecc8
This decorator, among other things, transforms the "event" argument passed when calling the decorated functions into actually passing event.content_object. So e.g. despite having a (before the decorator is applied) signature: ``` def handle_invoice_paid_event(stripe_invoice: stripe.Invoice, invoice: Invoice) -> None: ``` these are called passing an `Event` in the second arg when calling `handle_invoice_paid_event`: ``` handle_invoice_paid_event(stripe_invoice, event) ``` I found that kind of confusing because the @error_handler decorator didn't sound like something that would intervene in the arguments like that. So it feels helpful to rename it something with a less modest name, that makes it sound like it does more than just pure error-handling. |
||
---|---|---|
.. | ||
lib | ||
management | ||
migrations | ||
tests | ||
views | ||
__init__.py | ||
models.py | ||
urls.py |