Skip to content

fix(query_manager): handle timeout exceptions by using a completer for response stream#1515

Merged
vincenzopalazzo merged 1 commit intozino-hofmann:mainfrom
AngeloAvv:dio-link-server-exception-when-timeout-exception
Jan 13, 2026
Merged

fix(query_manager): handle timeout exceptions by using a completer for response stream#1515
vincenzopalazzo merged 1 commit intozino-hofmann:mainfrom
AngeloAvv:dio-link-server-exception-when-timeout-exception

Conversation

@AngeloAvv
Copy link
Contributor

This PR fixes an issue where a TimeoutException thrown during a GraphQL request is not properly handled and propagates through the main stack, resulting in an unhandled exception and a Crashlytics fatal error.

When a request exceeds queryRequestTimeout, the underlying Dio call may throw a DioException (for example with HTTP status code 504). This exception is currently wrapped in a DioLinkServerException but is not correctly surfaced through .exception, making it impossible for consumers to handle it properly.

This change ensures that timeout-related errors are correctly propagated and exposed to the caller, preventing unexpected application crashes and allowing proper error handling at the application level.

Maintainers should merge this PR because it:

  • Prevents unhandled exceptions that currently crash production apps
  • Aligns the runtime behavior with developer expectations
  • Improves reliability and stability when network timeouts occur

Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting on CI

@vincenzopalazzo vincenzopalazzo merged commit 1c0afed into zino-hofmann:main Jan 13, 2026
4 checks passed
@AngeloAvv AngeloAvv deleted the dio-link-server-exception-when-timeout-exception branch January 13, 2026 19:02
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.

Unhandled exception when DioLinkServerException is thrown due to TimeoutException

2 participants