ashishrawat2911/network_handling

Handle Validation Exception 422

fathialamre opened this issue · 4 comments

How I can get vaidation errors from backend ?

Hi @fathialamre
Add new exception here

Now handle the exception here and in this method

Hi @ashishrawat2911
I tried above but not working, please explain it

Thanks

Hello @fathialamre
Add the one more param "dynamic data" to this func. Now pass this value "error.response.data" to handleResponse func here so this assign to your first param. This way you can got the error data response inside this function specific to any status code!

Hello @fathialamre
Add the one more param "dynamic data" to this func. Now pass this value "error.response.data" to handleResponse func here so this assign to your first param. This way you can got the error data response inside this function specific to any status code!

Thanks