-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Improve error for "TypeError: this.buffer.substring is not a function" #459
Comments
Without a second encoding argument |
@eemeli What do you think about adding guard for Buffers with better error message. I made this mistake today and only here found solution in this ticket. Having error like "expected string, got Buffer" immediately narrow down problems. |
Sure, that makes sense. Feel free to submit a PR adding a better error to |
Describe the bug
To Reproduce
test.js
config.yml
Expected behaviour
I expected config.yml to be loaded and parsed to a JS object without error.
Versions:
yaml
: 2.2.1Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: