Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
Uncaught (in promise) Error:createError.js:16 Uncaught (in promise) Error: Request failed with status code 404

I am trying to make simple API Fetch with axios through a simple form,input, and everything works fine untill I pass user into my axio get.'

first error: GET https://api.github.com/users/$%7Buser%7D 404 second error: createError.js:16 Uncaught (in promise) Error: Request failed with status code 404 '''

  function App() {

  let getUser = (e) =>{
  e.preventDefault()
  const user = e.target.elements.username.value  

  axios.get("https://api.github.com/users/${user}")
  .then((res) => {
  console.log(res)
  })

  }

 return (

<div className="App">
  <header className="App-header">
    <h1 className="App-title">HTTP&API</h1>
  </header>
    <UserForm getUser={getUser}/>
</div>
  );
 }

'''

I am new to a web dev, any help would be appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

either concatenate the string

axios.get("https://api.github.com/users/" + user)

or use template strings

axios.get(`https://api.github.com/users/${user}`)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!