Is it possible to get the error code of a failed preflight request so that I can print a meaningful error message? (Or is there a habit of printing a static error for all failed preflight requests no matter the code?)
Clearly, the status code 401 is printed to the console, but the error handler or a .catch() statement only receive the error object thrown.

If I remove the header that triggers the preflight, I get to handle the response myself and I can extract the status code.

// also note that the returned code 401 in first screenshot is wrong. But that's another question..