Skip to content

Commit

Permalink
fix error reporting in vector query
Browse files Browse the repository at this point in the history
  • Loading branch information
swilly22 committed Feb 8, 2024
1 parent 9f11502 commit 603acd4
Showing 1 changed file with 11 additions and 8 deletions.
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)) {
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

0 comments on commit 603acd4

Please sign in to comment.