Back

Getting error in FSD 101 course

Created 1 year ago
145 Views
1 Comments
Naveenkumar1
@Naveenkumar1
Naveenkumar1
@Naveenkumar1Profile is locked. Login

The following are the error while accessing the token from the local storage after login

GET http://localhost:4000/home 404 (Not Found)

  1. AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}

    1. code: "ERR_BAD_REQUEST"

    2. config: {transitional: {…}, adapter: Array(2), transformRequest: Array(1), transformResponse: Array(1), timeout: 0, …}

    3. message: "Request failed with status code 404"

    4. name: "AxiosError"

    5. request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}

    6. response: {data: '<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta char…ody>\n<pre>Cannot GET /home</pre>\n</body>\n</html>\n', status: 404, statusText: 'Not Found', headers: AxiosHeaders, config: {…}, …}

    7. stack: "AxiosError: Request failed with status code 404\n at settle (http://localhost:5173/node_modules/.vite/deps/axios.js?v=4bc29ff8:1204:12)\n at XMLHttpRequest.onloadend (http://localhost:5173/node_modules/.vite/deps/axios.js?v=4bc29ff8:1421:7)"

    8. [[Prototype]]: Error

Comments
Please login to comment.