Skip to content

fix(torii): display more error details#4973

Merged
nxsaken merged 1 commit intohyperledger-iroha:mainfrom
0x009922:fix/slightly-better-torii-errors
Aug 21, 2024
Merged

fix(torii): display more error details#4973
nxsaken merged 1 commit intohyperledger-iroha:mainfrom
0x009922:fix/slightly-better-torii-errors

Conversation

@0x009922
Copy link
Copy Markdown
Contributor

@0x009922 0x009922 commented Aug 14, 2024

Description

While submitting an invalid transaction to Iroha, I got a response 400 Bad Request with message

Failed to accept transaction

That was not very helpful. This PR extends this message:

Failed to accept transaction

Caused by:
    Chain id doesn't correspond to the id of current blockchain: Expected ChainId("00000000-0000-0000-0000-000000000000"), actual ChainId("0")

Iroha has detailed errors internally, but their formatting doesn't work properly.

This PR does not aim to fix the issue entirely, but only highlights & fixes a special case of it. The main issue is #4974

Linked issue

Related to #4974

Benefits

Better error messages at least on the highest level of Torii.

@0x009922 0x009922 added Enhancement New feature or request UI Something about the interface labels Aug 14, 2024
@0x009922 0x009922 self-assigned this Aug 14, 2024
@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Aug 14, 2024
@mversic mversic force-pushed the fix/slightly-better-torii-errors branch from 740f962 to 4eb68f9 Compare August 19, 2024 12:53
@nxsaken nxsaken force-pushed the fix/slightly-better-torii-errors branch from 4eb68f9 to 6c49433 Compare August 21, 2024 08:48
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
@nxsaken nxsaken force-pushed the fix/slightly-better-torii-errors branch from 6c49433 to 3aa60e2 Compare August 21, 2024 10:03
@nxsaken nxsaken merged commit 2d4121f into hyperledger-iroha:main Aug 21, 2024
@0x009922 0x009922 deleted the fix/slightly-better-torii-errors branch August 23, 2024 06:43
mversic pushed a commit that referenced this pull request Aug 30, 2024
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-changes Changes in the API for client libraries Enhancement New feature or request UI Something about the interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants