Added additional error handling to VVRestAPI.js

Added additional error handling to VVRestAPI.js, updated
Samples\SendEmailScript.js