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: Telemetry blocks startup when offline #2794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JanCizmar
Copy link
Contributor

No description provided.

@JanCizmar JanCizmar requested a review from Anty0 December 19, 2024 09:00
HttpMethod.POST,
Unit::class.java,
)
} catch (e: Throwable) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
} catch (e: Throwable) {
} catch (e: Exception) {

Catch exception only. Catching errors as well is probably a bad idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noob question... but... Why is it bad idea? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is usually discouraged because it is generally impossible to recover from such errors programmatically anyway, and ignoring them (by catching them) only makes the issue worse. See: https://stackoverflow.com/a/2274130.

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