Home > Enterprise >  How to access message in DioError
How to access message in DioError

Time:03-03

How can I access the "Message" field inside the e enter image description here

CodePudding user response:

You need e.response?.data["Message"]

CodePudding user response:

Just add on DioError before catch

try {

} on DioError catch (e) {
  log(e.message);
}
  • Related