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

Allow option to return fail result if proxy call is failed #50

Open
ken-futureverse opened this issue Jun 13, 2024 · 0 comments · May be fixed by #53
Open

Allow option to return fail result if proxy call is failed #50

ken-futureverse opened this issue Jun 13, 2024 · 0 comments · May be fixed by #53
Labels
enhancement New feature or request

Comments

@ken-futureverse
Copy link
Contributor

Currently, if call wrapped around Futurepass failed, it's a silent one. The error details is tucked inside the proxy.ProxyExecuted which is easy to miss.

We should look at adding option to fail the extrinsic when that happen just like when any other failed extrinsic https://github.com/futureversecom/trn-js-api/blob/main/packages/extrinsic/src/libs/send.ts#L36

It needs to be optional flag to avoid breaking changes downstream, as they might have had their own error catching logic.

The proposed location is a 3rd parameter to the send function

export async function send(
  extrinsicOrResult: Extrinsic | Result<Extrinsic, Error>,
  onProgress?: ProgressCallback,
  options: { failedIfProxyError: boolean } = { failedIfProxyError: false }
)
@ken-futureverse ken-futureverse added the enhancement New feature or request label Jun 13, 2024
@KarishmaBothara KarishmaBothara linked a pull request Jun 17, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant