Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Missing "Earns" for app users: Node SDK should fail gracefully for "unknown" return code from Agora, instead of returning "success" #21

Open
rorymc opened this issue Jan 7, 2022 · 1 comment

Comments

@rorymc
Copy link

rorymc commented Jan 7, 2022

The submit transaction result only accounts for "error" or "success", and mis-handles "unknown" as "success"

export class SubmitTransactionResult {

this causes the issue where if Agora or blockchain has a problem (e.g. runs out of SOL, the blockchain has some delay), then Agora will return "unknown" instead of "error" or "success". Here's the problem:

  • ios/android SDKs handle "unknown", and gracefully retry
  • node SDK does NOT handle it properly, and returns "success"

this leads to the problem where:

  • when Agora/Solana blockchain has a hiccup, it returns txn IDs to node SDK clients as "successful" txns, however those txns do not exist on the blockchain
  • clients don't know any better, and thus cannot retry properly ==> missing Earns for app users

see discussion in this Discord thread.

@hitwill
Copy link

hitwill commented Jan 10, 2022

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants