-
First of all, really really cool and clean application of sealed classes + retrofit responses 💯💯 While i was trying to integrate the library into into my test project, I received an error :
Did i miss a step in configuring my migration from retrofit Responses into ApiResult? Thanks again and any insight is greatly appreciated 🙏🏽 Some more observations: Setup 1: No GsonConverterFactory as part of retrofit builder
Error: Error Received Unable to create converter for interface com.slack.eithernet.ApiResult Setup 2: With ApiResultConverterFactory after GsonConverterFactory
Error: Error Received Unable to invoke no-args constructor for interface com.slack.eithernet.ApiResult. Registering an InstanceCreator with Gson for this type may fix this problem. Setup 3: With GsonConverterFactory after ApiResultConverterFactory
Error: Error Received Unable to create converter for interface com.slack.eithernet.ApiResult |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey man I came across something that might help you. One option you have is to hash it out and try and make it work with EitherNet. Another option is to build a custom solution yourself. Whilst it may seem daunting, if you read the article I linked below, it could help in demystifying the process. For your purposes, you might just need something that simple. Something I found that helped me truly understand the inner workings of Retrofit and its Network response handling behaviour was this well-written article. That alternative allows you to use Retrofit's Moshi/Gson converter and a custom CallAdapter + CallAdapterFactory. What I gleaned from the article were 4 steps to doing this.
I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Aah i figured out my problem:
and now it works 😅 , it seems i have to read a bit more on the Parsing spec 😄 |
Beta Was this translation helpful? Give feedback.
Aah i figured out my problem:
and now it works 😅 , it seems i have to read a bit more on the Parsing spec 😄