AvdLee / appstoreconnect-swift-sdk

The Swift SDK to work with the App Store Connect API from Apple.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throw detailed error based on response returned from the API

AvdLee opened this issue · comments

  "errors" : [ {
    "id" : "8e3eec32-f7b3-4eba-86a4-0bea271944e5",
    "status" : "403",
    "code" : "FORBIDDEN_ERROR",
    "title" : "This request is forbidden for security reasons",
    "detail" : "The API key in use does not allow this request"
  } ]
}).0

Should be a thrown error like:

APIProvider.Error.forbidden(statusCode: 403, key: FORBIDDEN_ERROR, title: XXX, detail: XXX)

Fixed with: #186