Skip to content

Commit d9dd071

Browse files
committed
Working on debugging nativelands error in API.
1 parent da9791b commit d9dd071

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

v2.0/helpers/landing/landing.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,18 @@ const sendNativeLands = async function(req, res, next) {
400400
'maps': 'territories',
401401
};
402402
const searchParams = new URLSearchParams(outobj);
403+
403404
const maps = await fetch(`https://native-land.ca/api/index.php?${searchParams}`, {
404405
method: 'GET',
405406
headers: {
406407
'User-Agent': 'Neotoma Paleoecology Database API',
407408
},
408409
signal: AbortSignal.timeout(5000),
409410
}).catch((err) => {
411+
console.log('Fetch error caught:', err.name, err.message);
412+
console.log('Full error object:', err); // Add this
413+
console.log('Error cause:', err.cause); // Add this - often has the real error!
414+
410415
res.status(500)
411416
.json({
412417
status: 'failure',

0 commit comments

Comments
 (0)