How to throw and error in laravel and catch it with axios

Posted 8 months ago by SkyCoder

It may be a stupid question but when ever I return respons from laravel backend as:

return response() or return response('', 403)->json([], 403)

I get it inside then() why is there catch if it all goes to then() ?

I need then() for using next() for router and catch() for next(false).

I am just wondering whats wrong here?

Please sign in or create an account to participate in this conversation.