Skip to content

Conversation

@julien-lang
Copy link
Member

AttributeError: 'Exception' object has no attribute 'message'

AttributeError: 'Exception' object has no attribute 'message'
@julien-lang julien-lang requested a review from Copilot November 25, 2025 01:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an AttributeError that occurs when exception instances don't have a message attribute. The fix adds proper fallback handling when reporting errors, checking for the message attribute first, then falling back to args[0], and finally using a generic error message.

Key changes:

  • Added conditional checks to handle exceptions without a message attribute
  • Implemented fallback chain: messageargs[0] → "unknown error"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@julien-lang julien-lang marked this pull request as ready for review November 25, 2025 01:16
@julien-lang julien-lang requested a review from a team November 25, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants