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

Don't throw in Ping command #178

Closed
slvrtrn opened this issue Jul 13, 2023 · 0 comments · Fixed by #192
Closed

Don't throw in Ping command #178

slvrtrn opened this issue Jul 13, 2023 · 0 comments · Fixed by #192
Assignees
Labels
browser enhancement New feature or request node
Milestone

Comments

@slvrtrn
Copy link
Contributor

slvrtrn commented Jul 13, 2023

It just throws if it fails to connect, which is a bit awkward.

We can either just return false on a failed attempt or change the method signature to be some variation of Either concept to allow further debugging on the application side:

type PingResult = {
  type: 'Success'
} | {
  type: 'Failure'
  error: Error
}
@slvrtrn slvrtrn added the enhancement New feature or request label Jul 13, 2023
@slvrtrn slvrtrn self-assigned this Jul 20, 2023
@slvrtrn slvrtrn added this to the 0.2.0 milestone Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser enhancement New feature or request node
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant