-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash on 401 unauthorized status #5
Comments
@iceberg1369 |
` @provides @FormUrlEncoded @entity ) : Parcelable everything works if I submit vali email and password and model data is emitted. but in case of invalid email and password the 401 status code the app crashes. |
@skydoves is there anyway to handle errors in sandwitch? |
I face the same issue,crash on [ApiResponseCallDelegate.kt:33] when HTTP 400 rerurns |
I am facing the same issue : 401 returned instead of onError fired. Commenting to keep tabs on the issue |
I will check this issue and release the next version as soon as possible. Thanks! |
Hope to have a good solution |
|
Hi, @iceberg1369 @MasterXing @bogdanmunteanu @nevermore1000 Yesterday, released a new version 1.0.5 ! 🎉 Thanks for reporting this issue! 👍 |
@skydoves , all working great for 401 and all 504 status codes (on error is triggered) . Will test more and come later with more feedback but all seems good for know. Thanks for the fast release 👍 |
@skydoves 401 error handled by onError |
Please complete the following information:
Describe the Bug:
when I send A user pass to my api which unauthorized and throws 401 status code. the apiresponse call adapter factory crashed.
2020-09-12 14:16:55.564 7771-7771/com.skydoves.pokedex E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.skydoves.pokedex, PID: 7771
retrofit2.HttpException: HTTP 401 Response.error()
at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
at com.skydoves.sandwich.coroutines.ApiResponseCallDelegate$enqueueImpl$1.onResponse(ApiResponseCallDelegate.kt:33)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:504)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Add a clear description about the problem.
Expected Behavior:
A clear description of what you expected to happen.
onError expected to be fired
The text was updated successfully, but these errors were encountered: