Skip to content

How to check for error code when calling GetTransactionInfo #300

Description

@Bevilacqua

The README explains:

If you're unsure about the environment, follow these steps:

  • Initiate a call to the endpoint using the production URL. If the call is successful, the transaction identifier is associated with the production environment.
  • If you encounter an error code 4040010, indicating a TransactionIdNotFoundError, make a call to the endpoint using the sandbox URL.
  • If this call is successful, the transaction identifier is associated with the sandbox environment. If the call fails with the same error code, the transaction identifier doesn't exist in either environment.

How do you actually check the error code? The function only returns the response (which will be nil when there is an error) and an error. The error has the code embedded in the error string but is there a straight forward way to check what error code so we know when to try again with the sandbox URL?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions