-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ux): improve connection error reporting #10132
Conversation
Reviewer's Guide by SourceryThis pull request improves the error reporting for connection errors in Poetry. It provides more context to the user about the possible causes of the error, such as DNS resolution issues or network connectivity problems. Additionally, it modifies the generic HTTP error message to include the HTTP method and URL. Sequence diagram for improved connection error handlingsequenceDiagram
participant User as User
participant Poetry as Poetry Client
participant Server as Remote Server
User->>Poetry: Execute command requiring HTTP request
activate Poetry
Poetry->>Server: Attempt HTTP request
alt Connection fails
Server--xPoetry: Connection error
Poetry->>Poetry: Create detailed error message
Poetry-->>User: Display formatted error with:
Note right of User: - Failed URL
Note right of User: - Possible causes:
Note right of User: * Server not responding
Note right of User: * DNS resolution issue
Note right of User: * Network connectivity
end
deactivate Poetry
Class diagram showing PoetryRuntimeError modificationsclassDiagram
class PoetryRuntimeError {
-_messages: List[ConsoleMessage]
+create(reason: str, exception: Exception) PoetryRuntimeError
+append(message: str|ConsoleMessage) PoetryRuntimeError
}
class ConsoleMessage {
+indent(prefix: str) ConsoleMessage
+make_section(title: str) ConsoleMessage
+wrap(style: str) ConsoleMessage
}
PoetryRuntimeError ..> ConsoleMessage : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟡 Security: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
d89bc70
to
b1329c5
Compare
After (non-verbose)
After (verbose)
Summary by Sourcery
Improve connection error reporting by providing more context and potential causes for the error.
Bug Fixes:
Enhancements: