500 internal server error
Unanswered
Gouty oak gall posted this in #help-forum
Gouty oak gallOP
Does anyone experience that error?
5 Replies
Gouty oak gallOP
i have a request api on ListJobs component, i'm using
const { data, error, loading } = useQuery(GET_LAST_FIVE_JOBS_QUERY);
const { data, error, loading } = useQuery(GET_LAST_FIVE_JOBS_QUERY);
the error happens when i'm reloading the page
Asian black bear
when you calling the api path include the full path it should fix this i.e axios.get('http://localhost:3000/api/YOUR_PATH')
btw pls don't fetch your own apis in server side: https://nextjs-faq.com/fetch-api-in-rsc
if client side, you can just do relative url