Issue with c.call (truenas api client) with "job=True"

Hello,

for instance if I use (from example inside api_client/README.md at master · truenas/api_client · GitHub) : is_locked = c.call(“pool.dataset.lock”, “mypool/mydataset”, job=True) , if the dataset is already locked, then the job aborts and I get many lines of traceback messages :

Traceback (most recent call last):
File “E:\PYTHON\TRUENAS\api_tests\testex.py”, line 9, in
is_locked = c.call(“pool.dataset.lock”, “mypool/mydataset”, job=True)
File “E:\PYTHON\TRUENAS\env\Lib\site-packages\truenas_api_client_init_.py”, line 826, in call
return self.wait(c, callback=callback, job=job, timeout=timeout,
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
log_py_enotauthenticated=log_py_enotauthenticated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\PYTHON\TRUENAS\env\Lib\site-packages\truenas_api_client_init
.py", line 879, in wait
return jobobj.result()
~~~~~~~~~~~~~^^
File "E:\PYTHON\TRUENAS\env\Lib\site-packages\truenas_api_client_init
.py", line 364, in result
raise ClientException(
…<8 lines>…
)
truenas_api_client.exc.ClientException: [EFAULT] Dataset mypool/mydataset is already locked

BUT if “job=True” is not present or set to False, then I only have a message “already locked”

So the issue / question is about c.call with option job=true when any job aborts (as : pool.dataset.lock (already locked), app.upgrade (no upgrade available)…)

Many thanks for your help
Ronald