# st2 run sensu.client_delete client=st2-pkg-unstable-u14-ent-d01ba3d6c8.uswest2
.
id: 59372a4badf59216541c7566
status: failed
parameters:
client: st2-pkg-unstable-u14-ent-d01ba3d6c8.uswest2
result:
exit_code: 1
result: None
stderr: "No handlers could be found for logger "pysensu.api"
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 259, in <module>
obj.run()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 155, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/sensu/actions/client_delete.py", line 10, in run
return self.api.delete_client(client)
File "/opt/stackstorm/virtualenvs/sensu/lib/python2.7/site-packages/pysensu/api.py", line 99, in delete_client
self._request('DELETE', '/clients/{}'.format(client))
File "/opt/stackstorm/virtualenvs/sensu/lib/python2.7/site-packages/pysensu/api.py", line 64, in _request
raise SensuAPIException('API bad response')
pysensu.api.SensuAPIException: API bad response
"
stdout: ''
The error
Sensu API response is
404
and it happens when client we want to delete doesn't exist. According to specification this is correct: https://sensuapp.org/docs/latest/api/clients-api.html#clientsclient-deleteWe should try to catch the exception and return
Success
action execution result if client we want to delete is already deleted.