typesense / typesense-js

JavaScript / TypeScript client for Typesense
https://typesense.org/docs/api
Apache License 2.0
414 stars 75 forks source link

Import errors have no message #104

Closed themerk closed 2 years ago

themerk commented 2 years ago

ImportError throws with no message. It looks like this line should be super(message)

https://github.com/typesense/typesense-js/blob/3d7c270aea427fd6b2e96abe6ba0712d58fa8273/src/Typesense/Errors/ImportError.ts#L6-L9

I was thoroughly confused about what was going wrong in my import because I couldn't see this (very helpful) error message: https://github.com/typesense/typesense-js/blob/7cc70b4dc658c9335d586c705c58cf2123f3d317/src/Typesense/Documents.ts#L227-L232

jasonbosco commented 2 years ago

@themerk Thank you for catching this 🙏

I've fixed it here and pushed this out in v1.1.4-0. Could you give it a shot now and confirm if the error message shows up now?

themerk commented 2 years ago

@jasonbosco that's awesome, I appreciate the quick fix! Yep, I can confirm that error message now comes through.