1

I am using a loopback remote method to parse data that I get from a REST endpoint . I am trying to understand the 'err' object that is passed to the callback . The second parameter is the response object - whatever I get from the response and the third is the context object - that contains the status code apart from the request object. When is the 'err' object set by loopback ? Suppose I get a non 200 code from the REST endpoint - err is still null. I check the status code from the context object and then set err on my own.

Mayur Arora
  • 447
  • 5
  • 11

1 Answers1

0

Can you provide an example of your remote method implementation?

Remote methods don't receive an error object so I'm thinking I'm not quite understanding your question and I would need a bit more information to be helpful.

Remote method strongloop docs here: https://docs.strongloop.com/display/public/LB/Remote+methods