Skip to content

Conversation

@gabor
Copy link
Contributor

@gabor gabor commented Jan 8, 2025

fixes #1177

sometimes a response in a backend.QueryDataResponse has no refId (the refId is "").
this is technically not allowed, but we need to be able to handle the situation, otherwise we just error out with a cryptic error message.

@gabor gabor marked this pull request as ready for review January 8, 2025 13:08
@gabor gabor requested a review from a team as a code owner January 8, 2025 13:08
@gabor gabor requested review from andresmgot, oshirohugo and wbrowne and removed request for a team January 8, 2025 13:08
@gabor gabor force-pushed the gabor/fix-empty-refid branch from 4e6a25d to af88ffa Compare January 8, 2025 13:14
Copy link

@asimpson asimpson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

l2Field := iter.ReadObject()
for {
// the response may have an empty-string refId. this is not allowed,
// but it may happen, and we want to be able to handle the case.
Copy link
Contributor

Choose a reason for hiding this comment

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

but it may happen, and we want to be able to handle the case.

Out of curiosity, how can this currently happen? Do we need validation elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, we are removing the error here, therefore making having an empty refId valid. Is that what we want? From the issue description it appears that the goal is to return a meaningful error message, not remove the error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Clarified offline that we want to actually avoid the error here.

@gabor gabor merged commit 2c603f5 into main Jan 14, 2025
3 checks passed
@gabor gabor deleted the gabor/fix-empty-refid branch January 14, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants