Skip to main content
An uncertain outcome is Coffee Chats declining to guess. It means the connector cannot prove whether the change was written, so it says so rather than reporting a success or a failure it cannot stand behind. This guide shows you how to settle one. It is the only failure where the right next call is a read rather than a retry.

Recognise it

An uncertain result is keyed on status rather than on tag. Its status is uncertain and its error.code is OUTCOME_UNKNOWN:
contacts.notes.update result
Do not send the change again under a new key. A new key is a new change, so sending one before you have read what is stored can apply the same change twice.
Polling will not help either. Uncertain means the work is over and the answer is unavailable, so calling again returns the same thing.

Read the value that settles it

Every write has one read that answers the question. For the contact note above, that read is:
contacts.notes.get input

Decide from what you read

Whatever the read returns is the answer.
  • If the stored value already matches what was asked for, the change landed. There is nothing to do.
  • If it does not match, the change can be made again under a new idempotency key.
Tell the student what is stored now rather than what the result said. A raw code on its own tells them nothing.
actions.cancel never returns an uncertain outcome. It answers either that the review request is withdrawn or that it was no longer withdrawable, and there is nothing to reconcile.

Next steps

Handle errors and retries

The other two shapes a failure arrives in.

Error codes

Every code, its cause and the action to take.