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

fix: catch logerrors #48

Closed
wants to merge 1 commit into from
Closed

fix: catch logerrors #48

wants to merge 1 commit into from

Conversation

loks0n
Copy link
Member

@loks0n loks0n commented Dec 12, 2024

Wrap all calls to logError inside a try catch, so we don't spam sentry.

@loks0n loks0n requested a review from christyjacob4 December 12, 2024 17:54
try {
logError($error, "healthCheckError", $logger, null);
} catch (Throwable) {
Console::warning('Unable to send log message');
Copy link
Contributor

Choose a reason for hiding this comment

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

We'd still spam the errors to the provider with this.

Also, logging doesn't throw an exception on error, does it?

Copy link
Contributor

Choose a reason for hiding this comment

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

NVM ..it does

Maybe catch and log the error to the console

Copy link
Contributor

Choose a reason for hiding this comment

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

And maybe make the change in the logError function?

@loks0n loks0n closed this Dec 17, 2024
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 this pull request may close these issues.

2 participants