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

how to access full details about response #10

Open
srkimir opened this issue Feb 20, 2016 · 0 comments
Open

how to access full details about response #10

srkimir opened this issue Feb 20, 2016 · 0 comments

Comments

@srkimir
Copy link

srkimir commented Feb 20, 2016

What seems to me from following example, is that library will return just body of response for err or data, what about headers? What if i need status code of response?

...transactional.sendSmartEmail({
  To: [...],
  Data: {...},
  smartEmailID: ...,
  clientID: ...
}, function (err, data) {
  if (err) {
    console.log('ERROR', err)
  } else {
    console.log('RESPONSE', response)
  }
})

For example if recipient is omitted, err would be:

{ 
  Code: 952,
  Message: 'Recipient is required. At least one To, CC, or a BCC address is required' 
}
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