-- -
Hello
I have encountered a strange error. See below:
I have made an app in Next JS and retrieve various data from my own API. See below:
const Grid = await axios.get>(`/web/api/statistik/fetchPlockData?date=${choosenDate}`, { validateStatus: () => true });
The communication works fine to that apit but the response in the console is a bit strange –> data: “Execpetion Error: unable to verify the first certificate”
Status is 500!
Apit in turn retrieves data from a database. See below:
export const fetchPlockData = async (req: NextApiRequest, res: NextApiResponse) => { const { date } = req.query; try { const plockOrderRes = await axios.get('https://xxx.xxx.xxx/xxxxx/ASPlock/GetPlockOrder', { validateStatus: () => true }); console.log('plockOrderRes :', plockOrderRes); ………………………………………………………………… ………………………………………………………………… ………………………………………………………………… ………………………………………………………………… ……………………………
I log and the function runs empty try { but when axios tries to retrieve the data, the execution is stopped after i.e. no more logs are displayed
X stands for something I can’t show.
I can share some code if you need it.
Etc. Fredrik