Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Maik
Advisor

Management API error return values

Hello guys,

I am quite new when it comes to the usage of the management API and have a small question.

I've written a batch script which imports a list of "add access-rule commands" (e.g. line one: "mgmt_cli add access-rule layer [...]",  line two: "mgmt_cli add access-rule layer [...]", etc.). The script verifies each imported rule and gives the feedback of "ok" for a working one and an error message for non working ones. The error message contains the default return information of the api which looks like this (for a non existing object):

"code: "generic_err_object_not_found"

message: "Requested object [here is the object name] not found"

Unfortunately this message only contains the first error that the API can find within the command.

Now my question is; is it possible to receive all incorrect statements of a management api command and not just the first one that is found? Because by default if you try to execute a command, as mentioned before, only the first found error is being returned. It would be great, for troubleshooting purposes, to instantly see all incorrect or non existing statements of a command string. As currently, if errors are found, I need to change the command and run it again just to maybe see that later in the same command another error occured.

Thanks in advance and best regards,

Maik

3 Replies
Robert_Decker
Advisor

Hi Maik,

Management API errors are raised on a first match, they are not accumulated.

Robert.

Maik
Advisor

Hi Robert,

Thanks for the fast reply!

Are there any plans for future API updates to also allow accumlated errors per command?

Regards,

Maik

0 Kudos
Robert_Decker
Advisor

No, there are no such plans due to major performance downgrade.

The command that executes must return as fast as possible.

Robert.

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events