File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,10 @@ def apply(self, obj):
435435 subobj [part ] = value
436436
437437 else :
438- raise TypeError ("invalid document type {0}" .format (type (subobj )))
439-
438+ if part is None :
439+ raise TypeError ("invalid document type {0}" .format (type (subobj )))
440+ else :
441+ raise JsonPatchConflict ("unable to fully resolve json pointer {0}, part {1}" .format (self .location , part ))
440442 return obj
441443
442444 def _on_undo_remove (self , path , key ):
@@ -480,7 +482,10 @@ def apply(self, obj):
480482 msg = "can't replace non-existent object '{0}'" .format (part )
481483 raise JsonPatchConflict (msg )
482484 else :
483- raise TypeError ("invalid document type {0}" .format (type (subobj )))
485+ if part is None :
486+ raise TypeError ("invalid document type {0}" .format (type (subobj )))
487+ else :
488+ raise JsonPatchConflict ("unable to fully resolve json pointer {0}, part {1}" .format (self .location , part ))
484489
485490 subobj [part ] = value
486491 return obj
You can’t perform that action at this time.
0 commit comments