Skip to content

Throw more specific error in response interceptor #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 23, 2025

Conversation

JustWalters
Copy link
Contributor

@JustWalters JustWalters commented Apr 10, 2025

Calls to storage where the field doesn't exist return an array with a single null element. That causes an error when trying to access .type

I think this is a bug fix, but please let me know if it's not, or it's a breaking change a la
image

Update: Confirmed there are places we rely on this behavior, so instead of not throwing, we'll throw a more informative error. And opened #76 to avoid the error in the next major version.

Calls to storage where the field doesn't exist return an array
with a single null element. That throws an error when trying
to access .type
@JustWalters JustWalters requested a review from a team April 10, 2025 20:43
Instead throw an error with a hopefully more helpful message.
ryanflynndev
ryanflynndev previously approved these changes Apr 21, 2025
Copy link
Contributor

@ryanflynndev ryanflynndev left a comment

Choose a reason for hiding this comment

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

Not sure of a better message

@JustWalters JustWalters changed the title Filter out nulls in response interceptor Throw more specific error in response interceptor Apr 22, 2025
I'd been more generic because I don't know when else this happens, but this should always be accurate. Then the update to the latest SDK version becomes confusing IMO.
@JustWalters JustWalters merged commit 75c8413 into master Apr 23, 2025
2 checks passed
@JustWalters JustWalters deleted the storage-may-return-null branch April 23, 2025 16:34
@JustWalters JustWalters restored the storage-may-return-null branch May 16, 2025 13:23
@JustWalters JustWalters deleted the storage-may-return-null branch May 16, 2025 13:34
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.

3 participants