Fix it with Nico - Smart plug question, why use {errorCode} = 1

Hey guys,

In the smart plug voiceflow, in the flow “Login”, why do you set {errorCode} = 1 before sending the POST request? I don’t really understand what this means. Can someone help me please?

Thank you!!

Setting the errorCode variable back to 1 before the API call, if the API call fails then the errorCode value will still be 1, if the API call went fine, we map the result code to the errorCode (should be = 0 in that case)

1 Like