Skip to content

Commit a517bb8

Browse files
committed
Raise JSONPointerError if pointer index is out of range during parsing
1 parent dafca83 commit a517bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpath/pointer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _index(self, s: str) -> Union[str, int]:
115115
try:
116116
index = int(s)
117117
if index < self.min_int_index or index > self.max_int_index:
118-
raise JSONPointerIndexError("index out of range")
118+
raise JSONPointerError("index out of range")
119119
return index
120120
except ValueError:
121121
return s

0 commit comments

Comments
 (0)