question

development-user2679 avatar image
development-user2679 asked anton-nikitin answered

Unhelpful error response in multi-part response.

Is there a particular reason why error response bodies in a multi-part response don't actually include any details?


Take the following response text for example. There's no identifying extension id or url attached to the error response, which would be highly useful for logging and debugging purposes (yes, that the extension 404s is noted in the response "manifest" above the individual responses, but the only way to correlate the error items there with any error messages below is to rely on order.)


At the very least, it seems reasonable to replace [extensionId] in the error message with the actual extensionId. Even better to include the url.

Content-Type: application/json    {    "response" : [ {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1046387016/presence",      "status" : 200,      "responseDescription" : "OK"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/723888016/presence",      "status" : 200,      "responseDescription" : "OK"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967151016/presence",      "status" : 200,      "responseDescription" : "OK"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1008566016/presence",      "status" : 200,      "responseDescription" : "OK"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/999376016/presence",      "status" : 404,      "responseDescription" : "Not Found"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967163016/presence",      "status" : 200,      "responseDescription" : "OK"    }, {      "href" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967193016/presence",      "status" : 200,      "responseDescription" : "OK"    } ]  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1046387016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1046387016",      "id" : 1046387016,      "extensionNumber" : "2053"    },    "presenceStatus" : "Busy",    "telephonyStatus" : "CallConnected",    "userStatus" : "Available",    "dndStatus" : "TakeAllCalls"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/723888016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/723888016",      "id" : 723888016,      "extensionNumber" : "2109"    },    "presenceStatus" : "Offline",    "telephonyStatus" : "NoCall",    "userStatus" : "Offline",    "dndStatus" : "DoNotAcceptDepartmentCalls"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967151016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967151016",      "id" : 967151016,      "extensionNumber" : "2205"    },    "presenceStatus" : "Busy",    "telephonyStatus" : "CallConnected",    "userStatus" : "Available",    "dndStatus" : "TakeAllCalls"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1008566016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/1008566016",      "id" : 1008566016,      "extensionNumber" : "2345"    },    "presenceStatus" : "Offline",    "telephonyStatus" : "NoCall",    "userStatus" : "Offline",    "dndStatus" : "DoNotAcceptDepartmentCalls"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "errorCode" : "CMN-102",    "message" : "Resource for parameter [extensionId] is not found",    "errors" : [ {      "errorCode" : "CMN-102",      "message" : "Resource for parameter [extensionId] is not found",      "parameterName" : "extensionId"    } ],    "parameterName" : "extensionId"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967163016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967163016",      "id" : 967163016,      "extensionNumber" : "2123"    },    "presenceStatus" : "Busy",    "telephonyStatus" : "NoCall",    "userStatus" : "Busy",    "dndStatus" : "DoNotAcceptAnyCalls"  }  --Boundary_15030_891229182_1478546303338  Content-Type: application/json    {    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967193016/presence",    "extension" : {      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/extension/967193016",      "id" : 967193016,      "extensionNumber" : "2108"    },    "presenceStatus" : "Offline",    "telephonyStatus" : "NoCall",    "userStatus" : "Offline",    "dndStatus" : "DoNotAcceptDepartmentCalls"  }  --Boundary_15030_891229182_1478546303338--
errors
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

anton-nikitin avatar image
anton-nikitin answered
Thanks for pointing this out. I will submit the enhancement request to improve error response in this case.
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys