updated the way HttpErrors get thrown after a query is performed