-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Originated from ably/ably-cocoa#1268
Perhaps before we start trying to parse this field, we should get it added to the documentation for the "get details from a registered device" etc REST API endpoints?
(from here)
So, the issue point is that error field has no description in the docs:
Get details from a registered device
GET rest.ably.io/push/deviceRegistrations/deviceId
Returns
A JSON object like:
{
id: <string>,
clientId: <optional, string>
platform: <string>
formFactor: <string>,
metadata: <object>,
updateToken: <string>,
push: {
recipient: {
transportType: <string>,
<additional recipient address key/value pairs>
},
state: <active or failed>
}
}
Also, in order to fix this in code with appropriate tests, a new device should be added similar to one with the id "testDeviceDetails" (f.e. "testFailedDeviceDetails") which would always return failed state with an error, so it can be properly tested. Currentlly tests request a device like that:
GET rest.ably.io/push/deviceRegistrations/testDeviceDetails
which always in an active state (without error field).