Issue
I'm using Retrofit with RxJava in Android and making a POST request that returns a Completable.
If it can reach the server and the POST is successful it returns 2xx and it triggers onComplete
.
If for example i have no internet it triggers onError
.
What happens if it reaches the server and the POST returns a non 2xx code? Does it trigger onComplete
too or onError
?
If it triggers onComplete
, how can i check if it the POST was successful?
Thanks in advance.
Solution
All non-2xx codes will trigger onError()
Answered By - Cybr0ugh
Answer Checked By - Timothy Miller (JavaFixing Admin)