Nothing erodes frontend trust faster than an API that answers JSON on success and HTML on failure. Your React code parses the happy path fine, then one expired token returns a Laravel error page and the whole app crashes on response. data.
Source: [Dev.to](https://dev.to/kamrankhandev/my-api-has-exactly-five-failure-shapes-the-exception-renders-that-keep-every-error-json-1pc7)