How to correctly auth to server; what error to look for if you're doing it wrong; emit Error objects not string #183
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.
This is a documentation & correct error throwing fix for #155 & #172
Super short summary of what this does: explains how to correctly auth to server; what error to look for if you're doing it wrong; and code to emit Error objects not strings.
Tests are still passing :)
PS Yes, by re-making the Error object you do lose one stack frame from the error, but it's ok since it is not relevant (from what I saw).
I looked through all of index.js and corrected all instances of strings being thrown/emitted instead of Errors.