Linking the old ticket #191,
When using Fuel and setting If-None-Match manually, when the server returns a 304, currently an HttpException is raised, whereas this is actually expected. The happy-path shouldn't be "exceptional". When a 204 (No Content) is returned, Fuel doesn't complain unless you try to deserialize.
As it stands, by default redirectResponseInterceptor will not match the 304 (which is correct), followed by the validatorResponseInterceptor will error as it's not included in the default validRange. Only the 200-299 range is handled as valid, whereas 100-399 should be considered valid; only 400-599 are error codes.
https://github.com/kittinunf/Fuel/blob/56cf7ce2af6ea39b2fb013564d188a812c42cf55/fuel/src/main/kotlin/com/github/kittinunf/fuel/core/FuelManager.kt#L58
The default should not indicate something is an error when it's not (304, 300, 103, ...).
RxJS used to have the same issue, but this was fixed: https://github.com/ReactiveX/rxjs/issues/3308
I will take this.
@SleeplessByte @kittinunf can we close this now?
No, I will take this as well 馃挭
Most helpful comment
I will take this.