File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -931,8 +931,8 @@ def remote_validate_rule( # noqa: PLR0913
931931
932932def extract_error_field (source : str , exc : eql .EqlParseError | kql .KqlParseError , max_attempts : int = 10 ) -> str | None :
933933 """Extract the field name from an EQL or KQL parse error."""
934- # If error reported in subquery, adjust source accordingly
935- if exc .source != source : # type: ignore[reportUnknownMemberType]
934+ # If error reported in subquery and exc references exc.source rather than source , adjust source accordingly
935+ if exc .source != source and len ( exc . source . splitlines ()) > exc . line : # type: ignore[reportUnknownMemberType]
936936 source = exc .source # type: ignore[reportUnknownMemberType]
937937 lines = source .splitlines () # type: ignore[reportUnknownMemberType]
938938 mod = - 1 if exc .line == len (lines ) else 0 # type: ignore[reportUnknownMemberType]
You can’t perform that action at this time.
0 commit comments