You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when mutate request return error, I don't know how to handle errors.
I'm assuming that I want to process success in then, and process failure in onError.
At that time, I would like to get the error message defined in the response.
final api =DriverApiTalkClient(dio);
final body =TalkCreateParams(message:'test');
await api
.postTalk(body: body)
.then((response) =>showSnackbar(response.message))
.onError((_, __, response) {
if(response.statusCode ==400) {
showSnackbar(response.errorMessage);
} elseif(response.statusCode ==422) {
otherHandleError();
}
});
Sorry if this has already been done. I would be happy if you could teach me how to write it!
I think this will solve the redundant writing style that I was dissatisfied with with the previous openapi-generator, so I would be happy if you would consider it!
The text was updated successfully, but these errors were encountered:
Use case
when mutate request return error, I don't know how to handle errors.
I'm assuming that I want to process success in then, and process failure in onError.
At that time, I would like to get the error message defined in the response.
Proposal
want to write, example,
Sorry if this has already been done. I would be happy if you could teach me how to write it!
I think this will solve the redundant writing style that I was dissatisfied with with the previous openapi-generator, so I would be happy if you would consider it!
The text was updated successfully, but these errors were encountered: