Help

500 Internal server error

688 4
cancel
Showing results for 
Search instead for 
Did you mean: 
stellaWangg
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi guys, I'm new to web development and i'm trying to use a serverless function to fetch data from airtable. The fetch function works fine before, but this morning when I check my application it shows `isAxiosError.js:10
GET http://localhost:8888/api/products 500 (Internal Server Error).`

I used API Key before for the authentication but I have already changed the API key to personal token. However, it still not working for my project. Can anyone help me to solve this problem? Thanks in advance.

4 Replies 4

To confirm, that GET in turn does the fetch from Airtable, and you've tested that the fetch does indeed work with the new PAT?

If so, could you provide the error details from the GET or any additional error details / console logs you might think would be helpful?

Hi, thanks for replying. I tried to troubleshoot for a day and it still didn't work. It works perfectly fine before using API Key but after I changed to PAT it just didn't work anymore. I'm using netlify dev to test. Below is my code hope I can get some insights, thanks a million.

Hmm, okay.  If I were you I would use something like Postman to test the query with the new PAT to make sure that the PAT was working okay.  Once that's verified, I would start looking into the Netlify side of things to see whether everything works.  Given that you've made no code changes you shouldn't need to look into your code

You mentioned you're using Netlify; are you testing locally or in production?  If you're testing locally, could I confirm that your .env / .env.local have been updated?  If you're testing in production, could I confirm that after you updated the PAT in your env vars you redeployed? 

Hi thanks for helping out. I solved the problem, apparently the table method I used before is deprecated as well. So I changed to base method and solved the problem. Thanks for your help appreciate it.:)