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

398
Views
Uncaught (in promise) AxiosError in React

I am building a netflix clone using reactjs and I am with a error message Failed to load resource: the server responded with a status of 401 () Row.js:11 Uncaught (in promise) AxiosError

axios.js code:
import axios from "axios";

const instance=axios.create({
    baseURL:"https://api.themoviedb.org/3",
});
export default instance;

    row.js code:

    import React,{useEffect, useState} from 'react';
import axios from './axios';

const baseURL="http://image.tmdb.org/t/p/original/";
function Row({title,fetchURL}) {
    const [movies,setMovies]=useState([]);
    useEffect(()=>{
        async function fetchData(){
            const request= await axios.get(fetchURL);
            console.log(request);
            return request;
        }
        fetchData();
    },[fetchURL]);

  return (
    <h2>{title}</h2>
  )
}
export default Row;

    requests.js code:
const Api_KEY="***********";
const requests={
    fetchTrending:'/trending/all/week?api_key='+{API_KEY}+'&language=en-US',
    fetchNetflixOriginals:'/discover/tv?api_key='+{API_KEY}+'&with_networks=213',
    fetchTopRated: '/movie/top_rated?api_key='+{API_KEY}+'&language=en-US',
    fetchActionMovies: '/discover/movie?api_key='+{API_KEY}+'&with_genres=28',
    fetchComedyMovies:'/discover/movie?api_key='+{API_KEY}+'&with_genres=35',
    fetchHorrorMovies: '/discover/movie?api_key='+{API_KEY}+'&with_genres=27',
    fetchRomanceMovies: '/discover/movie?api_key='+{API_KEY}+'&with_genres=10749',
    fetchDocumentaries: '/discover/movie?api_key='+{API_KEY}+'&with_genres=99',
}
export default requests;
about 4 years ago · Juan Pablo Isaza
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!