Skip to content

Commit b6a888d

Browse files
authored
Extract original error upon exceptions, if any (#209)
1 parent 1c35bf5 commit b6a888d

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Changelog
55
=========
66

7+
- :bug:`209` Extract original error from :obj:`discord.ext.commands.errors.CommandInvokeError` before handling it.
78
- :release:`11.0.0 <18th March 2024>`
89
- :breaking:`208` Split ``fakeredis`` optional dependency from the ``async-rediscache`` extra. You can now install with ``[fakeredis]`` to just install fakeredis (with lua support), ``[async-rediscache]`` to install just ``async-rediscache``, or use either ``[all]`` or ``[async-rediscache,fakeredis]`` to install both. This allows users who do no rely on fakeredis to install in 3.12 environments.
910
- :support:`208` Add support for Python 3.12. Be aware, at time of writing, our usage of fakeredis does not currently support 3.12. This is due to :literal-url:`this lupa issue<https://github.com/scoder/lupa/issues/245>`. Lupa is required by async-rediscache for lua script support within fakeredis. As such, fakeredis can not be installed in a Python 3.12 environment.

pydis_core/utils/error_handling/commands/manager.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async def handle_error(
2929
Iterate through available handlers by registration order, and choose the first one capable of handling
3030
the error as determined by `should_handle_error`; there is no priority system.
3131
"""
32+
error = getattr(error, "original", error)
3233
for handler in self._handlers + [self._default]:
3334
if await handler.should_handle_error(error):
3435
callback = self._get_callback(handler, context_or_interaction)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pydis_core"
3-
version = "11.0.0"
3+
version = "11.0.1"
44
description = "PyDis core provides core functionality and utility to the bots of the Python Discord community."
55
authors = ["Python Discord <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)