Update connector.js

Add a 500 err code upon empty resp if error
Merge pull request #507 from newebug/master

Update connector.js