dio icon indicating copy to clipboard operation
dio copied to clipboard

✨ Introduce `DioExceptionLogBuilder`

Open AlexV525 opened this issue 1 year ago • 3 comments

Resolves https://github.com/cfug/dio/issues/1949 Resolves https://github.com/cfug/dio/issues/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

AlexV525 avatar Sep 18 '24 13:09 AlexV525

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

AlexV525 avatar Oct 04 '24 12:10 AlexV525

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

kuhnroyal avatar Oct 04 '24 14:10 kuhnroyal

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.82% 🟢 84.74% 🔴 -0.08%

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

github-actions[bot] avatar Jan 28 '25 11:01 github-actions[bot]