Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom error #113

Open
shotleybuilder opened this issue Nov 22, 2015 · 0 comments
Open

Custom error #113

shotleybuilder opened this issue Nov 22, 2015 · 0 comments

Comments

@shotleybuilder
Copy link

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant