Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate the error of continuously creating Spore into a user-friendly message. #13

Open
Dawn-githup opened this issue Aug 3, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Dawn-githup
Copy link
Collaborator

Dawn-githup commented Aug 3, 2023

Steps to reproduce the behavior:

1.Create Spores consecutively using the same account

####Error message

Error: {"code":-1107,"message":"PoolRejectedDuplicatedTransaction: Transaction(Byte32(0xfdc622e564f2883adbe51dea3ca727141a72f5b30276739fb6293eebb62c8966)) already exist in transaction_pool","data":"Duplicated(Byte32(0xfdc622e564f2883adbe51dea3ca727141a72f5b30276739fb6293eebb62c8966))"}
@ShookLyngs
Copy link
Collaborator

ShookLyngs commented Nov 12, 2023

If we need to translate RPC errors, the flow would be something like this:

sendTransaction() -> catch (err) { ... } -> getErrorByCode(err)

Is it like this? How do we collect these errors?

@Dawn-githup
Copy link
Collaborator Author

If we need to translate RPC errors, the flow would be something like this:

sendTransaction() -> catch (err) { ... } -> getErrorByCode(err)

Is it like this? How do we collect these errors?

Match the currently known error codes, and add new ones as they are discovered?

@ashuralyk ashuralyk added the enhancement New feature or request label Jan 19, 2024
@ashuralyk
Copy link
Collaborator

@Dawn-githup can this issue be closed?

@Dawn-githup
Copy link
Collaborator Author

Error: {"code":-1107,"message":"PoolRejectedDuplicatedTransaction: Transaction(Byte32(0x36504bbba374c14c302892d4cf2a9637b78438486e8807ce7c9a889d8e78323b)) already exist in transaction_pool","data":"Duplicated(Byte32(0x36504bbba374c14c302892d4cf2a9637b78438486e8807ce7c9a889d8e78323b))"}

Not modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants