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

Bubble up the error from within the scheduled rest request #364

Open
BigTunaKahuna opened this issue Dec 9, 2022 · 2 comments · May be fixed by #540
Open

Bubble up the error from within the scheduled rest request #364

BigTunaKahuna opened this issue Dec 9, 2022 · 2 comments · May be fixed by #540

Comments

@BigTunaKahuna
Copy link

Hello, I want to throw the error from my scheduled request when making a rest call. I can see it in the logs, but it returns a 200 as the commit overrides it. It is nice that it will get retried before getting blocked, but I need to let the browser know how the request went.

Is there an easy way to achieve this?

Thanks!

@BigTunaKahuna BigTunaKahuna changed the title Bubble up the error Bubble up the error from within the scheduled rest request Dec 9, 2022
@badgerwithagun
Copy link
Member

If you submit with a uniqueRequestId, you can use a TransactionOutboxListener to get notifications when jobs fail, complete or are blocked. The request id will be included in that callback. That should work for you now.

What you really need in additionto this is an API to query the status of a submitted request. This has already been requested (along with listing all running/blocked requests). I will be looking into it soon.

@badgerwithagun
Copy link
Member

@BigTunaKahuna in principle, would #540 work for you?

You can get the id of your request via a callback then either check the status periodically or use TransactionOutboxListener to get a notification.

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

Successfully merging a pull request may close this issue.

2 participants