I want to return a 401 status on an action when a certain error occurs
Hi kapa, i want to return a response of 401 when a certain action fails. In my case my action fetches some information from an external API but when this fails with a 401 status i want to also return a 401 status to the client.
Right now i do the following above but it throws the error but does still return a 200 to the client.
Right now i do the following above but it throws the error but does still return a 200 to the client.