Improve error handling across the board
This commit is contained in:
@@ -57,9 +57,9 @@ func (p *JSONProcessor) ProcessContent(content string, pattern string, luaExpr s
|
||||
}
|
||||
|
||||
// Find nodes matching the JSONPath pattern
|
||||
nodes := jsonpath.Get(jsonData, pattern)
|
||||
nodes, err := jsonpath.Get(jsonData, pattern)
|
||||
if err != nil {
|
||||
return content, 0, 0, fmt.Errorf("error executing JSONPath: %v", err)
|
||||
return content, 0, 0, fmt.Errorf("error getting nodes: %v", err)
|
||||
}
|
||||
|
||||
matchCount := len(nodes)
|
||||
|
Reference in New Issue
Block a user