Kashif
01/03/2020, 7:20 AMHitender Pannu
01/03/2020, 9:15 AMzhuinden
01/03/2020, 9:48 AMKashif
01/03/2020, 9:53 AMRxJava2CallAdapterFactory
, retrofits says ”
Direct body (e.g., {@code Observable<User>}) calls {@code onNext} with the deserialized body
* for 2XX responses and calls {@code onError} with {@link HttpException} for non-2XX responses and
* {@link IOException} for network errors
which means i need to declare base error class BaseError.kt which will check if it is IOException then show network failure error and if it is HttpException then get the error message from it.
This BaseError class will be extends by ViewModels which update ui via livedataHitender Pannu
01/03/2020, 10:00 AMKashif
01/03/2020, 10:02 AMHitender Pannu
01/03/2020, 10:04 AMKashif
01/03/2020, 10:05 AM