When calling the Novu#markSubscriberFeed method with a MarkSubscriberFeedAsRequestthe following exception is thrown:
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:395)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:259)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:161)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:266)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:40)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:153)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Code snippet used:
fun markNotificationAs(user: User, messageId: String, isRead: Boolean) {
val markRequest = MarkSubscriberFeedAsRequest(
messageId = messageId,
mark = Mark(read = isRead, seen = true),
)
runBlocking {
novu.markSubscriberFeed(user.id, markRequest)
}
}
When calling the
Novu#markSubscriberFeed
method with aMarkSubscriberFeedAsRequest
the following exception is thrown:Code snippet used: