I use fetch API to fetch data from our server with the POST method.
It seems that fetch API throws a " Network request failed" error every time the status code is 4XX. However, I need these codes in order to show the appropriate message to our users. Otherwise, the UX flow of our plugin could end confusing.
Btw, the GET method gives me the correct error codes.
Is there a way to access the exact status code of the error?