braintree / braintree_node

Braintree Node.js library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
334 stars 104 forks source link

Update util.js #172

Closed Siimone closed 4 years ago

Siimone commented 4 years ago

Improve error message when custom field is not correct. KeysError is usually referred to private/public keys errors, "custom fields" is more developer friendly, IMHO.

Summary

Checklist

scannillo commented 4 years ago

Hello @Siimone - after discussing this over with our team, we think the error message as-is is clear. Since the object name is InvalidKeysError having the message description match it makes the most sense here.