Skip to content

JsonPath.query() throws exception always with default msg #9

Description

@waraich

If there is compilation error in the query string then exception is always thrown with default msg, ideally it should be the error msg from the parser. Since its always "Bad JSONPath query" its hard to debug the issue. Some thing similar to this as in case of failure a Failure object is returned.

def query(q: String, js: JsValue): JsValue = {
val tokens = parser.compile(q)
if (!tokens.successful) {
error(Some(tokens.toString()))
} else {
parse(tokens.get, js)
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions