groupme-js / GroupMeCommunityDocs

21 stars 8 forks source link

Potentially breaking change: `meta.errors` may be an object #8

Open not-so-smart opened 2 years ago

not-so-smart commented 2 years ago

Some endpoints may return an object instead of an array for errors, altering the usual structure of the API response wrapper object.

Throughout this repository (and the official documentation) meta.errors is shown as an array rather than an object. This could break many implementations expecting only arrays to appear in this field.

Until we have a comprehensive list of possible errors for every request, which I doubt will happen anytime soon, each page that mentions the GroupMe API response structure must include the possibility of an errors object.


Example:

GET /v3/groups/27317261/members

Response:

{
  "meta": {
    "code": 400,
    "errors": {
      "filter": "cannot be blank"
    }
  }
}