When a Vonage API returns an error, for instance, if your account has no credit, the API will return an error in RFC 7807 format.
This provides a basic explanation of what the issue is, why it occurred and steps to resolve it. Check out the example to see how an out-of-credit is formatted.
You'll likely want to consider up-front what errors your application will need to handle, this page provides a list of all the possible errors that could occur with a more detailed explanation of how they can be addressed.