A key to understanding programming the Heroku API is to not get lost of with the obscure error messages.
For example…
Bad API Call
Expected([200, 201, 202, 204, 206, 304, 429]) <=> Actual(422 Unprocessable Entity)
This error can happen from invalid param values.
Documentation
Pay attention to this list:
Status | Error ID | Description |
---|---|---|
400 Bad Request | bad_request |
request invalid, validate usage and try again |
401 Unauthorized | unauthorized |
request not authenticated, API token is missing, invalid or expired |
402 Payment Required | delinquent |
either the account has become delinquent as a result of non-payment, or the account’s payment method must be confirmed to continue |
403 Forbidden | forbidden |
request not authorized, provided credentials do not provide access to specified resource |
403 Forbidden | suspended |
request not authorized, account or application was suspended. |
404 Not Found | not_found |
request failed, the specified resource does not exist |
406 Not Acceptable | not_acceptable |
request failed, set Accept: application/vnd.heroku+json; version=3 header and try again |
409 Conflict | conflict |
request failed, see response body for suggested resolution |
410 Gone | gone |
requested resource can no longer be found at this location, see the Platform API Reference for alternatives. |
416 Requested Range Not Satisfiable | requested_range_not_satisfiable |
request failed, validate Content-Range header and try again |
422 Unprocessable Entity | invalid_params |
request failed, validate parameters try again |
422 Unprocessable Entity | verification_needed |
request failed, enter billing information in the Heroku Dashboard before utilizing resources. |
429 Too Many Requests | rate_limit |
request failed, wait for rate limits to reset and try again, see rate limits |