An error was being returned when an empty response is expected.#2611
Merged
srfrog merged 2 commits intoSep 25, 2018
Merged
Conversation
When testing inequality value vars with non-matching values, the response was sent as an error although it should return empty result if the query has correct syntax. Closes #2610
manishrjain
reviewed
Sep 25, 2018
| func (sg *SubGraph) ApplyIneqFunc() error { | ||
| if sg.Params.uidToVal == nil { | ||
| return x.Errorf("Expected a valid value map. But got empty.") | ||
| x.Println("Expected a valid value map. But got empty.") |
Contributor
There was a problem hiding this comment.
You can get rid of the println here. Just return nil
Contributor
|
LGTM. One comment. |
srfrog
commented
Sep 25, 2018
Contributor
Author
srfrog
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)
query/query.go, line 1637 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
You can get rid of the println here. Just return nil
Done. Added a comment for reference.
dna2github
pushed a commit
to dna2fork/dgraph
that referenced
this pull request
Jul 19, 2019
…ph-io#2611) * An error was being returned when an empty response is expected. When testing inequality value vars with non-matching values, the response was sent as an error although it should return empty result if the query has correct syntax. Closes dgraph-io#2610
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When testing inequality value vars with non-matching values, the
response was sent as an error although it should return empty result
if the query has correct syntax.
Closes #2610
This change is