Most errors responses I see from the API are in this format:
{"code":401,"error":"invalid_token","error_description":"The access token provided is invalid."}
However, I just noticed that when attempting to create an invalid transaction, I get an error of a different format:
# Note that I used a wrong value for the destination field
curl "https://api.bitreserve.org/v0/me/cards/OMITTED_CARD_ID/transactions" \
-X POST \
-H "Authorization: Bearer OMITTED_TOKEN" \
-d "denomination[currency]=BTC&denomination[amount]=0&destination=this_email_does_exist"
{"code":"validation_failed","errors":{"destination":[{"code":"invalid","message":"This value is not valid"}]}
Most errors responses I see from the API are in this format:
However, I just noticed that when attempting to create an invalid transaction, I get an error of a different format:
Is this intendend?