aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_core
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2024-03-20 20:13:48 +0100
committerGravatar GitHub <[email protected]>2024-03-20 19:13:48 +0000
commitb6a888d218276d473f29a2cf5d413843cb156b1a (patch)
tree57cba84f67ec30fa8bd88bf39a91517ce0adcb6c /pydis_core
parentBump version to 11.0.0 (diff)
Extract original error upon exceptions, if any (#209)
Diffstat (limited to 'pydis_core')
-rw-r--r--pydis_core/utils/error_handling/commands/manager.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pydis_core/utils/error_handling/commands/manager.py b/pydis_core/utils/error_handling/commands/manager.py
index 81e6a269..8f07f6bf 100644
--- a/pydis_core/utils/error_handling/commands/manager.py
+++ b/pydis_core/utils/error_handling/commands/manager.py
@@ -29,6 +29,7 @@ class CommandErrorManager:
Iterate through available handlers by registration order, and choose the first one capable of handling
the error as determined by `should_handle_error`; there is no priority system.
"""
+ error = getattr(error, "original", error)
for handler in self._handlers + [self._default]:
if await handler.should_handle_error(error):
callback = self._get_callback(handler, context_or_interaction)