Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.
This repository was 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

@rorymc

Description

@rorymc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions