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

feat: workspace error handler #1799

Merged
merged 8 commits into from
Jul 6, 2023
Merged

Conversation

HugoCasa
Copy link
Contributor

@HugoCasa HugoCasa commented Jul 5, 2023

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 5, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 024d5dc
Status: ✅  Deploy successful!
Preview URL: https://bc65ac89.windmill.pages.dev
Branch Preview URL: https://feat-workspace-error-handler.windmill.pages.dev

View logs

@HugoCasa
Copy link
Contributor Author

HugoCasa commented Jul 5, 2023

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jul 5, 2023
@HugoCasa
Copy link
Contributor Author

HugoCasa commented Jul 5, 2023

recheck

@HugoCasa HugoCasa marked this pull request as ready for review July 6, 2023 13:33
Comment on lines 462 to 483
if let Some(error_handler) = error_handler {
run_error_handler(
rsmq.clone(),
queued_job,
db,
result,
&error_handler.strip_prefix("script/").unwrap(),
false,
None,
)
.await?;
}

if let Some(ref global_error_handler) = *GLOBAL_ERROR_HANDLER_PATH_IN_ADMINS_WORKSPACE {
run_error_handler(
rsmq.clone(),
queued_job,
db,
result,
global_error_handler,
true,
tag,
)
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do this, failure of error handler will prevent global error handler to trigger :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to run both and return a new meta error if error that is merge or one of them

@rubenfiszel rubenfiszel merged commit 54cd5ce into main Jul 6, 2023
4 of 5 checks passed
@rubenfiszel rubenfiszel deleted the feat/workspace_error_handler branch July 6, 2023 19:43
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants