mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Raise special CommandSyncFailure during sync for better errors
This is parsed from the error to allow for users to better debug what exactly is causing the issue in sync.
This commit is contained in:
@ -121,6 +121,7 @@ class HTTPException(DiscordException):
|
||||
self.code = message.get('code', 0)
|
||||
base = message.get('message', '')
|
||||
errors = message.get('errors')
|
||||
self._errors: Optional[Dict[str, Any]] = errors
|
||||
if errors:
|
||||
errors = _flatten_error_dict(errors)
|
||||
helpful = '\n'.join('In %s: %s' % t for t in errors.items())
|
||||
|
Reference in New Issue
Block a user