Skip to content
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

fix error reporting in vector query #560

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/procedures/proc_vector_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ static ProcedureResult Proc_VectorQueryInvoke
SIValue query_vector; // query vector

// extract arguments from map
if(!_extractArgs(args,
&k,
&label,
&attribute,
&query_vector)) {
ErrorCtx_SetError(EMSG_PROC_INVALID_ARGUMENTS);
if(!_extractArgs(args, &k, &label, &attribute, &query_vector)) {
AviAvni marked this conversation as resolved.
Show resolved Hide resolved
return PROCEDURE_ERR;
}

Expand Down Expand Up @@ -287,7 +282,11 @@ ProcedureResult Proc_VectorQueryNodeInvoke
const char **yield // procedure output
) {
ProcedureResult res = Proc_VectorQueryInvoke(ctx, args, GETYPE_NODE);
if(res != PROCEDURE_OK) return res;
if(res != PROCEDURE_OK) {
ErrorCtx_SetError(EMSG_PROC_INVALID_ARGUMENTS,
"db.idx.vector.queryNodes");
return res;
}

//--------------------------------------------------------------------------
// process yield
Expand Down Expand Up @@ -324,7 +323,11 @@ ProcedureResult Proc_VectorQueryRelInvoke
const char **yield // procedure output
) {
ProcedureResult res = Proc_VectorQueryInvoke(ctx, args, GETYPE_EDGE);
if(res != PROCEDURE_OK) return res;
if(res != PROCEDURE_OK) {
ErrorCtx_SetError(EMSG_PROC_INVALID_ARGUMENTS,
"db.idx.vector.queryRelationships");
return res;
}

//--------------------------------------------------------------------------
// process yield
Expand Down