Skip to content

Feature: Add __str__ to OAuthRefreshException#107

Open
glensc wants to merge 2 commits into
mainfrom
OAuthRefreshException-__str__
Open

Feature: Add __str__ to OAuthRefreshException#107
glensc wants to merge 2 commits into
mainfrom
OAuthRefreshException-__str__

Conversation

@glensc
Copy link
Copy Markdown
Owner

@glensc glensc commented May 28, 2026

Extracted from #104

@glensc glensc self-assigned this May 28, 2026
@glensc glensc requested a review from Copilot May 28, 2026 16:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@glensc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 50 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b0313988-ca5a-4dee-bec0-52a73a49e5bf

📥 Commits

Reviewing files that changed from the base of the PR and between 2c7091c and 18149c1.

📒 Files selected for processing (1)
  • trakt/errors.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch OAuthRefreshException-__str__

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

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

Adds a __str__ method to OAuthRefreshException so stringifying the exception produces a more descriptive message that includes the error and error_description fields from the OAuth response when available, falling back to the inherited message.

Changes:

  • Implement __str__ on OAuthRefreshException with three formatting branches (both fields, error only, message only).

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

Comment thread trakt/errors.py
Comment on lines +84 to +91
def __str__(self):
if self.error and self.error_description:
return f'{self.message}: {self.error} - {self.error_description}'

if self.error:
return f'{self.message}: {self.error}'

return self.message
Comment thread trakt/errors.py
Comment thread trakt/errors.py
Comment on lines +84 to +91
def __str__(self):
if self.error and self.error_description:
return f'{self.message}: {self.error} - {self.error_description}'

if self.error:
return f'{self.message}: {self.error}'

return self.message
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants