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):
435
435
subobj [part ] = value
436
436
437
437
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 ))
440
442
return obj
441
443
442
444
def _on_undo_remove (self , path , key ):
@@ -480,7 +482,10 @@ def apply(self, obj):
480
482
msg = "can't replace non-existent object '{0}'" .format (part )
481
483
raise JsonPatchConflict (msg )
482
484
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 ))
484
489
485
490
subobj [part ] = value
486
491
return obj
You can’t perform that action at this time.
0 commit comments