0

I am interested in the best practice for handling errors in the Google Action SYNC handler.

I see in the docs that I can return an errorCode in the SYNC response, however, none of the documented error codes seem to be compatible with the SYNC handler, only QUERY, EXECUTE, etc.

I see that the SYNC response must contain a userAgentId or the Action service deems it an invalid response, however, what happens when I am unable to authenticate the user and I am unable to determine and ID for them?

In that case, should I simply provide an empty string for that property?

Should I just response with an empty object {} in the response when I encounter an error?

Any info is helpful, thanks.

Caine Nielsen
  • 319
  • 2
  • 14

1 Answers1

0

Of all the listed error codes, not all of them may make sense but some like relinkRequired could be useful.

More specifically for you, in the case that the authentication process fails that error should come from the OAuth link. Your account linking, when presented with an incorrect user, should fail at that point and not proceed with sending a SYNC response.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35