Notification service resubscribing throws exception

Hi.

We use notification services.

We update subscribed users every 12 hours, in order to use the channel for more than 24 hours.

When the following method is applied, "com.mypurecloud.sdk.v2.ApiException: error" outputs.

Q1: What are the possible reasons for an ApiException being returned?

Q2: In the case of an ApiException being returned, is it a correct assumption that the re-subscription of all users eligible for renewal has failed?

Hi Atsushi,

What is the method you are using that is throwing the exception? Also, is there any error message being returned with the error?

Regards,
Declan

Hi Declan,

The method in use that is throwing the exception is:

NotificationsApi.ChannelTopicEntityListing putNotificationsChannelSubscriptions(PutNotificationsChannelSubscriptionsRequest request)

Also, an error message returned with the error returns the "error" string.

Regards,
Atsushi

Hi Atsushi,

Would you be able to send a screenshot of the error and if possible the request body? Also, this page contains some info on usage limits and the reasons for some errors that may occur when using the notifications API's which may be of help in the meantime.

Regards,
Declan

Hi Declan,

Requests to GenesysCloud are from my java application using the PlatformSDK.
It is not possible to check the contents of requests from the Platform SDK to GenesysCloud.
An exception occurred while resubscribing the topic.
The output contents are as follows.

ERROR : Thread-6 - com.mypurecloud.sdk.v2.ApiException: error
at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705)
at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757)
at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868)
at com.mypurecloud.sdk.v2.api.NotificationsApi.putNotificationsChannelSubscriptions(NotificationsApi.java:647)
at com.mypurecloud.sdk.v2.api.NotificationsApi.putNotificationsChannelSubscriptions(NotificationsApi.java:613)
at co.nextgen.gcmanager.service.GenesysCloudCommServiceImpl$RefreshSession.lambda$run$0(GenesysCloudCommServiceImpl.java:1720)
at java.util.HashMap.forEach(HashMap.java:1289)
at co.nextgen.gcmanager.service.GenesysCloudCommServiceImpl$RefreshSession.run(GenesysCloudCommServiceImpl.java:1676)
at java.lang.Thread.run(Thread.java:748)

Regards,
Atsushi

Hi Declan,

Do you have any information from the above exception message?

Regards,
Atsushi

Indeed you can. Use ApiClient.serialize(...) on your request body payload to get a string containing the JSON representation of the class; this is the same process that the SDK uses internally to prepare the JSON payload when making requests. You can also share your code that's constructing the request.

Please use the WithHttpInfo variety of the method to obtain a response object that contains the response headers and raw response body, and provide both. The specific method you're looking for is putNotificationsChannelSubscriptionsWithHttpInfo(...)

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.