Hi team
In your API service class you are just checking if response is type of particular type (model) thn only return else null... so how can you show user exact error that what happen .. Example in login, user can put wrong OTP so we have to show "Invalid OTP" or may be user enter expired OTP so we need to show "OTP expired"
But in your case we cant show this. Or may be i am wrong ... please suggest a way am using Vexana
hello @behlsoft, of course, you have many scenarios for error state so vexana give response.error options for u. For example you can use like this:
Other think: if you have a base error model for the backend side, you can add this json model in network request then you can access directly model form response.error.model:
response.error.model
Hi team In your API service class you are just checking if response is type of particular type (model) thn only return else null... so how can you show user exact error that what happen .. Example in login, user can put wrong OTP so we have to show "Invalid OTP" or may be user enter expired OTP so we need to show "OTP expired" But in your case we cant show this. Or may be i am wrong ... please suggest a way am using Vexana
`final response = await manager.send<LoginResponseModel, LoginResponseModel>(NetworkRoutes.LOGIN.rawValue, parseModel: LoginResponseModel(), method: RequestType.POST, data: model);