|
@@ -286,14 +286,14 @@ def put_resource(uuid):
|
|
disposition=disposition)
|
|
disposition=disposition)
|
|
except InvalidResourceError as e:
|
|
except InvalidResourceError as e:
|
|
return str(e), 409
|
|
return str(e), 409
|
|
- except ServerManagedTermError as e:
|
|
|
|
|
|
+ except (ServerManagedTermError, SingleSubjectError) as e:
|
|
return str(e), 412
|
|
return str(e), 412
|
|
except IncompatibleLdpTypeError as e:
|
|
except IncompatibleLdpTypeError as e:
|
|
return str(e), 415
|
|
return str(e), 415
|
|
|
|
|
|
try:
|
|
try:
|
|
ret = rsrc.put()
|
|
ret = rsrc.put()
|
|
- except (InvalidResourceError, ResourceExistsError ) as e:
|
|
|
|
|
|
+ except (InvalidResourceError, ResourceExistsError) as e:
|
|
return str(e), 409
|
|
return str(e), 409
|
|
except TombstoneError as e:
|
|
except TombstoneError as e:
|
|
return _tombstone_response(e, uuid)
|
|
return _tombstone_response(e, uuid)
|
|
@@ -327,7 +327,7 @@ def patch_resource(uuid):
|
|
return str(e), 404
|
|
return str(e), 404
|
|
except TombstoneError as e:
|
|
except TombstoneError as e:
|
|
return _tombstone_response(e, uuid)
|
|
return _tombstone_response(e, uuid)
|
|
- except ServerManagedTermError as e:
|
|
|
|
|
|
+ except (ServerManagedTermError, SingleSubjectError) as e:
|
|
return str(e), 412
|
|
return str(e), 412
|
|
|
|
|
|
return '', 204, headers
|
|
return '', 204, headers
|