Skip to content

🐛 Allow callFollowingErrorInterceptor when rejecting in ErrorInterceptorHandler#2543

Open
AlexV525 wants to merge 3 commits into
mainfrom
alexv525-fix-queued-interceptor-reject
Open

🐛 Allow callFollowingErrorInterceptor when rejecting in ErrorInterceptorHandler#2543
AlexV525 wants to merge 3 commits into
mainfrom
alexv525-fix-queued-interceptor-reject

Conversation

@AlexV525

Copy link
Copy Markdown
Member

Fixes #2462

RequestInterceptorHandler and ResponseInterceptorHandler both expose a callFollowingErrorInterceptor flag in their reject() methods, but ErrorInterceptorHandler.reject() was missing it — it always emits InterceptorResultType.reject, unconditionally skipping any subsequent error interceptors.

The errorInterceptorWrapper in dio_mixin.dart already handles rejectCallFollowing correctly, so only the handler method needed updating.

RequestInterceptorHandler and ResponseInterceptorHandler both support
the callFollowingErrorInterceptor flag in their reject() methods, but
ErrorInterceptorHandler.reject() was missing it, always emitting
InterceptorResultType.reject and causing subsequent error interceptors
to be skipped unconditionally.

The errorInterceptorWrapper in dio_mixin.dart already handles
rejectCallFollowing correctly, so only the handler method needed fixing.

Fixes #2462

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AlexV525 AlexV525 requested a review from a team as a code owner June 27, 2026 02:14
AlexV525 and others added 2 commits June 27, 2026 10:39
Add a regression test to ensure calling ErrorInterceptorHandler.reject(error, true)
inside QueuedInterceptorsWrapper continues to following error interceptors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
Overall Coverage 🟢 85.54% 🟢 85.54% ⚪ 0%

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

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.

QueuedInterceptors strange behavior

1 participant