Skip to content

TransactionHttp#getTransactionStatus doesn't return an error reason. #387

@44uk

Description

@44uk
  1. Expected behavior and actual behavior.

Result of TransactionHttp#getTransactionStatus doesn't contain an error reason.
I think there is no way to get an error reason using SDK.

  1. Steps to reproduce the problem.
import { TransactionHttp } from "nem2-sdk"

const txHttp = new TransactionHttp("http://api-01.us-east-1.nemtech.network:3000")
txHttp.getTransactionStatus("8F4654BC708421BFBB3C7C4EDB5BD6AF16E376B0A3E58182E4FF2B6075F2373B")
  .subscribe(
    status => console.debug(status)
  )

/*
TransactionStatus {
  status: undefined,
  group: 'failed',
  hash: '8F4654BC708421BFBB3C7C4EDB5BD6AF16E376B0A3E58182E4FF2B6075F2373B',
  deadline: Deadline { value: LocalDateTime { _date: [LocalDate], _time: [LocalTime] } },
  height: undefined
}
*/

Get from API Endpoint:

http://api-01.us-east-1.nemtech.network:3000/transaction/8F4654BC708421BFBB3C7C4EDB5BD6AF16E376B0A3E58182E4FF2B6075F2373B/status

{
  hash: "8F4654BC708421BFBB3C7C4EDB5BD6AF16E376B0A3E58182E4FF2B6075F2373B",
  code: -2143092733,
  deadline: "116822518510",
  group: "failed"
}

code: -2143092733 means Failure_Core_Insufficient_Balance

Hash "8F4654BC708421BFBB3C7C4EDB5BD6AF16E376B0A3E58182E4FF2B6075F2373B" might be removed when you see because of the transaction had not been confirmed.

  1. Specifications like the version of the project, operating system, or hardware.

Node: http://api-01.us-east-1.nemtech.network:3000
serverInfo:
restVersion: 1.0.20.2
sdkVersion: 0.7.20.2

SDK: v0.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions