hyperledger-firefly / hyperledger-firefly/firefly

Transaction failure reason not visible when using fixed gas amount

Open
#1,466 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
602
Forks
246
Avg merge
18h 47m
Merged PRs (30d)
6

Description

FireFly normally reports custom error messages all the way back to the API response which is really helpful for developers. Typically, if a transaction will fail, it will also fail the gas estimation step which happens synchronously with submitting the transaction, so the custom error message is reported immediately.

If I submit a transaction, by invoking a custom contract API and adding a fixed gas amount, the behavior is different.
```json
{
"input": {},
"options": {
"gas": "20000"
}
}
```

The request is accepted with a `202` and internally gas estimation is skipped (I think). This results in a failed transaction, but my custom error message does not show up in the Operation Output or Details so it is really hard to know why the transaction failed, especially if I have complex logic that could reject the transaction for one of several reasons.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.