I can not get error message and the only thing I found in browsers console :
https://prnt.sc/xi7o13
and
https://prnt.sc/xi7pnn
the only place where I saw an error message is res.text : https://prnt.sc/xi7x1q
but that is string literal of full error and if there is a way to get only this error text and flash it ?
I added "superagent": "^6.1.0" into my Laravel 8 app and when I got error on Laravel side I try to catch it and show in flas message, like:
superagent .get('/profile/user_prop') // .send({ name: 'Manny', species: 'cat' }) // sends a JSON post body // .set('X-API-Key', 'foobar') .set('accept', 'json') .end((err, res) => { console.log('err::') console.log(err)
It works ok, when I return error message in json return :
But in case of error in not in return block, like :
I can not get error message and the only thing I found in browsers console : https://prnt.sc/xi7o13 and https://prnt.sc/xi7pnn the only place where I saw an error message is res.text : https://prnt.sc/xi7x1q but that is string literal of full error and if there is a way to get only this error text and flash it ?
Thanks!