CM-16758: fix npe on invalid response from api
CM-16758: handle 500 response
Merge pull request #17 from richardbremner/CM-16758

CM-16758: fix npe on invalid response from api