Background report 500 interfaces, front-end get an error message details

Recent and front-end interface to time, front-end interfaces newspaper said backstage 500, can not get something inside, then began this research, check some information online, found the error report details 500 inside can be obtained.

When the front end of the call interface, plus a catch, pay attention! ! ! Here print should be error.response, rather than error, printing error is less than get inside things.

.catch(error => {
        console.log(error.response.data.error.message,"5456654456")
}

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/liguix/p/11934438.html