diff options
-rw-r--r-- | bot/exts/info/code_snippets.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index 5c6cb5ae2..3c8b862c3 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -229,10 +229,11 @@ class CodeSnippets(Cog): snippet = await handler(**match.groupdict()) all_snippets.append((match.start(), snippet)) except ClientResponseError as error: + error_message = error.message # noqa: B306 log.log( logging.DEBUG if error.status == 404 else logging.ERROR, - f'Failed to fetch code snippet from {error.request_info.real_url}. ' - f'Status: {error.status}. Message: {error}.' + f'Failed to fetch code snippet from {match[0]!r}: {error.status} ' + f'{error_message} for GET {error.request_info.real_url.human_repr()}' ) # Sorts the list of snippets by their match index and joins them into a single message |