Hi
Just wondering how to return a custom error.
From the Docs "If the callback has a result, it will be returned from the wrapped function. If there is an error, it will be thrown"
The custom error returned from apiCall is ignored and the wrapper throws a code 500. Which on the client is interpreted as "internal server error".
How to get access to the error from apiCall?
var response = Async.wrap(apiCall)(apiUrl);
var jsonResult = Async.wrap(Meteor.myFunctions.parsingXML)(response.content);
return jsonResult;
Hi Just wondering how to return a custom error. From the Docs "If the callback has a result, it will be returned from the wrapped function. If there is an error, it will be thrown" The custom error returned from apiCall is ignored and the wrapper throws a code 500. Which on the client is interpreted as "internal server error". How to get access to the error from apiCall?