Skip to content

Conversation

@jonasbn
Copy link
Contributor

@jonasbn jonasbn commented Jan 25, 2025

Hi @kerma

I am working hard on getting my colleagues to dig more into good and useful error messages, so this is vary much on top of my mind these day and I can recommend this blog post:

So this Saturday morning I was fooling around with defaultbrowser and it struck me, that the error message could be improved.

The error message proposed in this PR aims to tap into the following part from the linked article:

Help them fix it: Tell them exactly what to do if there’s a way to possibly fix it.

When the handler is not recognized, a list of known handlers are appended to the error message indicating this, so the user can faster get to a resolution.

Example:

test is not available as an HTTP handler

Available HTTP handlers are:
  iterm2
  browser
  zen
  chrome
  firefoxdeveloperedition
  safari

Well whether you choose to take this into consideration or not is up to you, I just want to take the chance to thank you. You would not believe how much I use defaultbrowser every day.

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.

1 participant