You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 2.6.0-SNAPSHOT
Exception: KotlinNullPointerException
Message: Response from {path to my suspend fun...} was null but response body type was declared as non-null
The current structure of my suspend fun in my service interface:
@POST("api/...")
suspend fun request(@Body body: Body): Response?
I'm using Gson for serialization.
Is there a way to declare the response body type as nullable that I'm missing? I've tried adding null safety on my response object with ? and @Nullable with no success.
dogadaev, ChristianKatzmann, Shusshu, pavi2410, joshrotenberg and 66 more