Open plajjan opened 3 years ago
yes, we had a round of discussion about it with @karimra
I am in favour of reflecting the end result of the command intent in the return code, which would be non-zero in that case. Karim, on the other had, inclined to separate application errors from the return code of the gnmic client. I.e. gNMI client succeeded in sending the request, it just happened that request response encapsulated the application error.
iirc, we decided to hear user' voices to see which is more common and appreciated.
added for cap, get and set RPCs, subscribe is a more complicated case, hopefully not needed.
The return code of
gnmic
does not appear to convey how things actually went, for example, using invalid credentials:Enabling debug log, we do see that we get an auth failure.
Let the return code reflect this by returning a non-0 value.
I'm not sure if this is a generic problem or specific to auth failures.