stream-chat-android
stream-chat-android copied to clipboard
App crashes on deleting parent thread message
When in a thread for a chat conversation, whenever I delete the initial message for the thread, it crashes the app with the following error;
D/OkHttp: --> DELETE https://chat-us-east-1.stream-io-api.com/messages/?api_key=myApiKey&user_id=usersId&client_id=myClientId
D/OkHttp: --> END DELETE
D/OkHttp: <-- HTTP FAILED: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was NUMBER at line 1 column 4 path $
E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com.myTest.android.playground, PID: 4988
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was NUMBER at line 1 column 4 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.getstream.sdk.chat.rest.response.ErrorGsonAdapter.read(ErrorGsonAdapter.java:19)
at com.getstream.sdk.chat.rest.response.ErrorGsonAdapter.read(ErrorGsonAdapter.java:10)
at com.google.gson.Gson.fromJson(Gson.java:927)
at com.google.gson.Gson.fromJson(Gson.java:892)
at com.google.gson.Gson.fromJson(Gson.java:841)
at com.google.gson.Gson.fromJson(Gson.java:813)
at com.getstream.sdk.chat.rest.response.ErrorResponse.parseError(ErrorResponse.java:40)
at com.getstream.sdk.chat.rest.response.ErrorResponse.parseError(ErrorResponse.java:57)
at com.getstream.sdk.chat.rest.controller.TokenAuthInterceptor.intercept(TokenAuthInterceptor.java:52)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
at com.getstream.sdk.chat.rest.controller.RetrofitClient.lambda$getAuthorizedClient$1(RetrofitClient.java:46)
...