Skip to content

Commit

Permalink
Merge pull request #1604 from Permify/dsl-bugs
Browse files Browse the repository at this point in the history
fix: update error handling for unsupported walk
  • Loading branch information
tolgaOzen committed Sep 18, 2024
2 parents 0f1b552 + 146a142 commit b00a2af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/dsl/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func (t *Compiler) compileCall(entityName string, call *ast.Call) (*base.Child,

// If the argument has more than two identifiers, it indicates an unsupported relation walk.
// Return an error in this case.
return nil, compileError(argument.Idents[2].PositionInfo, base.ErrorCode_ERROR_CODE_NOT_SUPPORTED_WALK.String())
return nil, compileError(argument.Idents[1].PositionInfo, base.ErrorCode_ERROR_CODE_NOT_SUPPORTED_WALK.String())
}

// Set the child's type to be a leaf with the compiled call information.
Expand Down
Binary file modified playground/public/play.wasm
Binary file not shown.

0 comments on commit b00a2af

Please sign in to comment.