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 DioExceptionLogLevel #2296

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 DioExceptionLogLevel to break existing contents of the exception. Developers will be able to define the logging level. They can either log the URL plus the tip or not log the URL and the tip.

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

@AlexV525 AlexV525 force-pushed the feat/improve-exceptions-serialization branch from 7dcaba0 to 691abb7 Compare September 18, 2024 14:11
Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
dio/lib/src/dio_exception.dart 🟢 92.98% 🟠 70.79% 🔴 -22.19%
Overall Coverage 🟢 84.46% 🟢 83.52% 🔴 -0.94%

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

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
1 participant