mangopay4-nodejs-sdk
Version:
Mangopay Node.js SDK
20 lines (17 loc) • 407 B
JavaScript
/**
* Examples of trying to read invalid data.
*/
const mangopay = require('../index');
const api = new mangopay({
clientId: 'your-client-id',
clientApiKey: 'your-client-api-key'
});
/**
* Try to request invalid user
*/
const INVALID_UID = '11510910021zx';
api.Users.getNatural(INVALID_UID)
.catch(function(data) {
// Catch the failure
console.error(data.Message);
});