Skip to content

Return errors in salt-api calls; add API-centric support for new exit codes #20301

@Grokzen

Description

@Grokzen

I have setup salt-api (cherrypy) and a salt-master on the same machine and i have a few minions connected to the master.

If i then issue a command to be executed to the api that do not match any targets i get back from requests the following:

>>> r
<Response [200]>
>>> r.text
u'{"return": [{}]}'

But i get a string output on stdout from salt-api saying No minions matched the target. No command was sent, no jid was assigned. so clearly the error is recognized somewhere but the error is not handled by the root endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.Salt-APIstale

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions