lob/lob-ruby

Rest Client Error

shrav opened this issue · 1 comments

curl https://api.lob.com/v1/areas
-u xxxxx:
-d "name=123456789"
-d "front=https://lob.com/areafront.pdf"
-d "back=https://lob.com/areaback.pdf"
-d "routes=94104"
-d "target_type=residential"
-d "full_bleed=1"
{
"errors": [
{
"message": "Area mail requires a minimum of 1000 Addresses, you only have 513",
"status_code": 422
}
]
}

If that returns via the rest api, in the ruby gem, you get an error:
422 Unprocessable Entity (RestClient::UnprocessableEntity)

Long story short, better error handling.

+1