archethic-foundation / archethic-foundation/libjs

use the new error in the transactionError subscription

Open
#201 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
19
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem?

_No response_

### Describe the solution you'd like

We deprecated the `reason` from the `transactionError`.
Instead the SDK should use the new property`error` which is of type :
```
{
code: Int
data: any
message: String
}
```

### Additional context

I believe this require a major version bump

A util function such as `formatError` would be great because we might have inception of errors and that would provide great error message (example: "Invalid recipient execution: Condition Failed: still locked")

### Epic

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the transactionError subscription and the current use of its deprecated reason property. Trace the subscription payload to confirm how the new error object is exposed, then check existing tests for transaction errors. Done means the subscription uses error consistently, with any formatError behavior and major-version changes documented or covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.