The DataObjectManager.put method forwards to parallel_put depending on certain conditions but because of the way it handles errors (starting at https://github.com/irods/python-irodsclient/blob/main/irods/manager/data_object_manager.py#L369) the exceptions raised are not necessarily the same as for put without parallel transfer. Moreover depending on what goes wrong, parallel_put raises a differet exception type than put even though from the user's point of view the situation is exactly the same. This makes it rather non-trivial to handle specific exceptions.
For instance when trying to upload data to a path for which there's no collection yet I'm expecting an irods.exception.CAT_UNKNOWN_COLLECTION which I can then handle properly. But with default settings, for a large file put calls into parallel_put and ultimately leads to a RuntimeError with message 'parallel_put failed' being raised.
Note that even if put would not catch exceptions but just raise whatevever parallel_put raises it would still not result in an irods.exception.CAT_UNKNOWN_COLLECTION in this case, but an irods.exception.CollectionDoesNotExist because that is what parallel_put produces.
Similar issues exist for get() / parallel_get(). Didn't check if there are other places where this could also happen.
The
DataObjectManager.putmethod forwards toparallel_putdepending on certain conditions but because of the way it handles errors (starting at https://github.com/irods/python-irodsclient/blob/main/irods/manager/data_object_manager.py#L369) the exceptions raised are not necessarily the same as forputwithout parallel transfer. Moreover depending on what goes wrong,parallel_putraises a differet exception type thanputeven though from the user's point of view the situation is exactly the same. This makes it rather non-trivial to handle specific exceptions.For instance when trying to upload data to a path for which there's no collection yet I'm expecting an
irods.exception.CAT_UNKNOWN_COLLECTIONwhich I can then handle properly. But with default settings, for a large fileputcalls intoparallel_putand ultimately leads to aRuntimeErrorwith message 'parallel_put failed' being raised.Note that even if
putwould not catch exceptions but just raise whateveverparallel_putraises it would still not result in anirods.exception.CAT_UNKNOWN_COLLECTIONin this case, but anirods.exception.CollectionDoesNotExistbecause that is whatparallel_putproduces.Similar issues exist for
get()/parallel_get(). Didn't check if there are other places where this could also happen.