better ckan api error handling