heavyai-connector
heavyai-connector copied to clipboard
Provide better error messages when connection fails
:beetle: If bug
- [ ] Operating System and version:
- [ ] Browser and version:
- [ ] Steps to reproduce (including dashboard link):
- [x] Description of issue:
When the browser connector fails to connect to a MapD instance, there often is no useful error message in the console. Instead something like this will often show up:
Nothing is visible in the network response either.
It would improve the developer friendliness of this library immensely if we could provide useful error messages.
:new: If feature request
- [x] User story: As an application or data visualization engineer using mapd-core and/or mapd backend rendering, I need to be able to debug mapd-connector when the connection fails.
- [ ] Specific requirements/functionality:
- [ ] Mocks (if applicable):
cc @alexbaden @andrewseidl I know there was some related issue about CORS somewhere, maybe you might have some ideas for fixing this as well.
Look at: https://github.com/omnisci/mapd-connector/blob/master/thrift/browser/thrift.js#L336-L346
Seems the Thrift.Transport assumes success...
@nermaljcat is correct, this is an issue with Thrift not handling the .onerror event of the XHR, resulting in the exception blowing up the stack with no info.
Tracking in https://jira.omnisci.com/browse/FE-8235