-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
DioError [DioErrorType.response]: Http status error [500] #1171
Comments
Hi, @DhavalRKansara Did you call any print exception.toString() method in catch body? |
I am facing same issue |
same here code : |
I have same issue. Any updates on 14 June 2021??? |
any success please?? |
Unfortunately, I have the same issue. |
I'm also experiencing similar issue! |
not facing any issue right now, previously I have faced http 500 error because of passing wrong uri |
Have you guys solved the Error? about Dio 500 server error |
the same here code :
|
Yes we have solved it
…On Tue, Jul 6, 2021, 2:25 PM Dikshit Kanani ***@***.***> wrote:
Have you guys solved the Error? about Dio 500 server error
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACEQCNYVNFWLLF6W642R3KTTWLAGJANCNFSM45RL2HVA>
.
|
How did you solved it? I expect error to be handled when catching it in
|
same here |
yes some error here |
same here |
1 similar comment
same here |
`getHotels() async {
}` Dont catch 404 |
same here |
When I update dio to 4.0.0, some post requests response 500 error and some works fine.
I solved the error by passing before dio 4.0.0:
dio 4.0.0:
|
I have same issue. And when I upload app to Apple rejected :( |
same problem: |
i find my issue due to vpn havent work |
I've experienced the same error. After looking at the server side error logs, I've found out that some of request headers from Dio was missing like content-type, token, etc. Somehow Dio seemed to have a problem in dispatching request while it fetches data from interceptors. A quick and dirty solution I came up with was wrapping the request logic in a Future.delayed() as follows. In my case goes from @override
void initState() {
super.initState();
context.read<SomeCubit>().load();
} to @override
void initState() {
super.initState();
Future.delayed(const Duration(milliseconds: 300), () {
context.read<SomeCubit>().load();
});
} |
Same issue here, whenever my API is returning 4xx errors (e.g., 401) I receive this uncaught exception (even though I have the call in try/catch block)
While debugging, if I skipped this uncaught exception it continue to my catch block which is weird dio version 4.0.1 |
try 4.0.3 |
NewDocViewModel.NoSuchMethodError: Class 'String' has no instance getter 'statusCode'. |
Getting same issue 4.0.6 as well, why errors are not getting caught in try catch? |
I got same issue ^4.0.6 |
I found something. If you have an interceptor |
I have the same issue [DioError [DioErrorType.response]: Http status error [500] |
Same here. I have a post request working fine on 4.0.6 but when I upgrade to 5 suddenly nothing posts anymore, I keep getting 500 errors. If it worked with v4 the. definitely it's not my apis |
@cfug requests working fine on 4.0.6 but when I upgrade to 5, i got this :
|
With dio: ^5.0.3 I am getting the below error with post request and the same post request working fine with the postman. |
add
|
Anyone found solution i have same issue, I tried with versions |
@Shvet 500 is a server error, dio does not create that error our of nowhere. Maybe some default header is missing that is automatically added by postman. Create a reproducible sample and open a new issue. |
This comment has been minimized.
This comment has been minimized.
fixed it was server side issue! |
Use dio.interceptors.add(InterceptorsWrapper(onError: (DioError e, handler) {
|
Future homescreenAPI() async {
} error I/flutter (14037): DioError [DioErrorType.response]: Http status error [500] |
With Dio 4.0.0 I am getting the below error with post request and the same post request working fine with the postman.
Code:
Error:
The text was updated successfully, but these errors were encountered: