Please see CB-6337 and use CordovaError instead of Error (don't forget to add the require for it)