You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #150 Add a 'Did you mean ...' error message in case of an unrecognized API property (Lyrkan)
This PR was squashed before being merged into the master branch (closes#150).
Discussion
----------
Add a 'Did you mean ...' error message in case of an unrecognized API property
This PR aims to improve the error message displayed when an user makes a typo in the name of one of the API methods he's trying to use.
Since pictures speak louder than words:
**Before**

**After**

Note that the error is triggered when trying to access the property, not when the method is called (since it doesn't exist), hence the "is not a recognized property" message. I'm aware that the use of the "property" word in it may not be ideal, but using "method" instead feels wrong too since we could theoretically have other things than methods in the API object.
Commits
-------
a16e1af Only add the "Did you mean" message if the levenshtein distance is less than 3
1ceabc1 Add "or method" to the "Did you mean ..." error message
d592481 Add a 'Did you mean ...' error message for unrecognized API methods
0 commit comments