Improve error handling of query.
Improve error handling of query.

Alex-Ian-Hamilton/sunpy,mjm159/sunpy,Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,dpshelio/sunpy,mjm159/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy