Improved error message for unrecognized handler #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
defaultbrowserand 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:
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 safariWell 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
defaultbrowserevery day.