Skip to content

Conversation

@btrautmann
Copy link
Contributor

📰 Summary of changes

What is the new functionality added in this PR?

This PR protects against the case where we get a DecodingError when there was no response, which previously caused a null pointer. I think this is actually a fair trade-off, since we can't fail to decode something if there was nothing to decode.

🧪 Testing done

What testing was added to cover the functionality added in this PR

Added a test for the same.

@btrautmann btrautmann requested review from a team as code owners December 23, 2025 20:23
} on Exception catch (e) {
await _onEvent(
DecodingError(
request: responsePayload.dioResponse!.requestOptions,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This null check previously caused a NPE (seen when migrating the TT dart client to this version).

Copy link

@joshdep joshdep left a comment

Choose a reason for hiding this comment

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

domain lgtm

@btrautmann
Copy link
Contributor Author

/no-platform

@btrautmann btrautmann merged commit 5265fea into main Dec 23, 2025
5 checks passed
@btrautmann btrautmann deleted the bt/fix/decoding-null-check branch December 23, 2025 20:44
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.

2 participants