• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: code : “ERR_BAD_REQUEST” Axios error: Request failed with status code 404

Resolved: code : “ERR_BAD_REQUEST” Axios error: Request failed with status code 404

0
By Isaac Tonny on 16/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve code : “ERR_BAD_REQUEST” Axios error: Request failed with status code 404

Question:

I’m building an ecommerce website with React and Strapi. When I try to get the products and categories from Strapi this error pops up:
This is the code from the api.js
I’ve generated the token multiple time thinking it could be an error while copy-pasting. And also, I’ve checked Strapi documentation looking for answers.

Best Answer:

Something in your URL is undefined, look at the request :
It should not be undefined
You should console.log your url to fix it.
Best, Eric

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

reactjs strapi
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to set consistent decimal separators in R data frame?

26/03/2023

Resolved: How to resolve LNK2001 in c++ projects

26/03/2023

Resolved: How to correctly initialize vector of number in Typescript

26/03/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.