heavyai-connector icon indicating copy to clipboard operation
heavyai-connector copied to clipboard

Provide better error messages when connection fails

Open clhenrick opened this issue 6 years ago • 3 comments

: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:

screen shot 2018-05-22 at 2 43 29 pm

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.

clhenrick avatar May 22 '18 21:05 clhenrick

Look at: https://github.com/omnisci/mapd-connector/blob/master/thrift/browser/thrift.js#L336-L346

Seems the Thrift.Transport assumes success...

nermaljcat avatar Feb 27 '19 05:02 nermaljcat

@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.

jonvuri avatar Apr 01 '19 16:04 jonvuri

Tracking in https://jira.omnisci.com/browse/FE-8235

jonvuri avatar Apr 01 '19 16:04 jonvuri