I would like to be able to handle any exceptions that are raised by custom middleware. I expected (hoped) that these
exceptions would be caught by the @app.error registered handler; but this was not the case. I am looking for the
correct way to catch these exceptions. Thank you.
Reproducible in:
slack-bolt @ file:///Users/jeremy.schulman/Library/Caches/pypoetry/artifacts/31/56/a3/cbe3c0937d465ddd945b547d34863a08eac8399ae0dfd15353626d4728/slack_bolt-1.6.1-py2.py3-none-any.whl
slack-rbac==0.1.0
slack-sdk @ file:///Users/jeremy.schulman/Library/Caches/pypoetry/artifacts/90/be/66/e7459a165f28d4862e6a844a8a667019bb88087b17641413be0e03f8ec/slack_sdk-3.6.0-py2.py3-none-any.whl
Python 3.8.8
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H1217
Darwin Kernel Version 19.6.0: Thu May 6 00:48:39 PDT 2021; root:xnu-6153.141.33~1/RELEASE_X86_64
Steps to reproduce:
- Created a custom middleware listener
- Registered an @app.error to catch exceptions
- Raised a RuntimeError exception in that middleware
Expected result:
Want to see the @app.error handler catch the error caused by the raise in middleware
Actual result:
Observed the exception stacktrace in the console output
I would like to be able to handle any exceptions that are raised by custom middleware. I expected (hoped) that these
exceptions would be caught by the @app.error registered handler; but this was not the case. I am looking for the
correct way to catch these exceptions. Thank you.
Reproducible in:
Steps to reproduce:
Expected result:
Want to see the @app.error handler catch the error caused by the raise in middleware
Actual result:
Observed the exception stacktrace in the console output