Discriminate between server and client errors. If it's a client error, parse the JSON to pretty print the failure reason. I assume that every client error response looks similar (contains error.message).
This is the response I got because a payment method was missing:
Discriminate between server and client errors. If it's a client error, parse the JSON to pretty print the failure reason. I assume that every client error response looks similar (contains
error.message
).This is the response I got because a payment method was missing:
Fixes #2