Closed irnc closed 9 years ago
Yeah that's fine. Sound's good. Nice idea. Lets do it!
But we'll take care if we still throw Error
object wrapped up over the status error
etc thrown by LinkedIn?
So, it will make something like this:
// If something wrong happened with status & request code is != 200
throw Error('put_linkedIn_error_message_here');
Right now LinkedIn errors are not passed as
err
to callback.By LinkedIn error I mean HTTP response with status code not equal to 200 and with response body with
errorCode
property.For now only connection level errors are passed as
err
(this is behaviour inherited fromrequest
module).Are you ok to receive pull request which implement passing LinkedIn errors to callback as
err
?