Skip to content
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

✨ Introduce DioExceptionLogBuilder #2297

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexV525
Copy link
Member

Resolves #1949
Resolves #2287

Developers may want the URL of the exception to know what endpoint has gone wrong, or they want to have fewer tips about what the status code means. If we open too many flags to support various logging content, it will be a mess eventually.
Introducing the DioExceptionLogBuilder easily builds text content from the DioException.

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
dio/lib/src/dio_exception.dart 🟢 92.98% 🟢 89.39% 🔴 -3.59%
dio/lib/src/utils.dart 🟢 98.28% 🟢 98.31% 🟢 0.03%
Overall Coverage 🟢 84.46% 🟢 84.38% 🔴 -0.08%

Minimum allowed coverage is 0%, this run produced 84.38%

@AlexV525
Copy link
Member Author

AlexV525 commented Oct 4, 2024

I guess we can go for the builder, any thought about this? @ueman @kuhnroyal

@kuhnroyal
Copy link
Member

I think this is good, same goes for the log level.

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.

Keep DioException.toString clean !!! DioException.toString() should contain the request information
2 participants