-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dio] Fix missing source stacktrace in DioError (#1722)
[Improve nullability in DioMixin.assureResponse](8418c72) * there should never be a case where there are not `RequestOptions` available * this is technically a breaking change but we should instead mark this `@internal` in the future [Fix missing source stacktrace in DioError](4f4ffe4) * a `DioError` should always have a meaningful stacktrace which points to the actual invocation of `Dio.get/post/xxx` * `Dio` historically lost a lot of this source information due to a multitude of asynchronous calls * now the source stacktrace is consistently being set into the `RequestOptions` instance and can later be retrieved and used when a `DioError` is constructed * additionally a `DioError` may contain another cause which may itself contain a separate stackTrace with more detailed information ### New Pull Request Checklist - [x] I have read the [Documentation](https://pub.dev/documentation/dio/latest/) - [x] I have searched for a similar pull request in the [project](https://github.com/cfug/dio/pulls) and found none - [x] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase) - [x] I have added the required tests to prove the fix/feature I'm adding - [x] I have updated the documentation (if necessary) - [x] I have run the tests without failures - [x] I have updated the `CHANGELOG.md` in the corresponding package ### Additional context and info (if any) The existing behavior which was somewhat correct got lost in #1405 which was merged in the temporary diox repository. --------- Signed-off-by: Alex Li <[email protected]> Co-authored-by: Alex Li <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,120 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,9 @@ plugins/http2_adapter/test/*_pinning.txt | |
|
||
.vscode/ | ||
|
||
# FVM | ||
.fvm | ||
|
||
# Miscellaneous | ||
.DS_Store | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.