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

chore: job-service handle exceptions #6818

Merged
merged 1 commit into from
Apr 10, 2024
Merged

chore: job-service handle exceptions #6818

merged 1 commit into from
Apr 10, 2024

Conversation

gastonfournier
Copy link
Contributor

About the changes

This allows failed functions to record that they've failed when wrapped with a job.

Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Apr 10, 2024 10:32am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Apr 10, 2024 10:32am

Comment on lines +11 to +12
// @ts-ignore setMuteError is not part of getLogger interface
config.getLogger.setMuteError(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

is the setMuteError really on the LogProvider, and not the Logger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The provider:

noLoggerProvider.setMuteError = (mute: boolean) => {
muteError = mute;
};
because of how the function is defined:
error: muteError ? () => {} : console.error,

I don't like it much, but I also didn't want to spend much time on it

Copy link
Contributor

@chriswk chriswk left a comment

Choose a reason for hiding this comment

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

Nice

@gastonfournier gastonfournier merged commit e6ec78f into main Apr 10, 2024
9 checks passed
@gastonfournier gastonfournier deleted the catch-exceptions branch April 10, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants