I have requirement where i must access the response HTTP headers returned from my retrofit api calls
so i refactored my return types as follows:-
@Headers(HEADER_ANNOTATION_ACCEPT)
@GET("annotations")
suspend fun annotations(@QueryMap queryParameters: Map<String, String>): ResponseE<CallError, List<Annotation>>
Tower Guidev2
07/11/2023, 11:54 AM
however this change generates a runtime error:-
Unable to create call adapter for retrofit2.Call<arrow.retrofit.adapter.either.ResponseE<arrow.retrofit.adapter.either.networkhandling.CallError, java.util.Lis...
Caused by: kotlinx.serialization.SerializationException: Serializer for class 'CallError' is not found.