Skip to content

Commit 9c5c596

Browse files
committed
Trying some errorhandling here.
This is in the API call to the NativeLands API. There's an issue with the key that I can't reproduce locally.
1 parent 03f3a8c commit 9c5c596

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

v2.0/helpers/landing/landing.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,13 @@ const sendNativeLands = async function(req, res, next) {
406406
'User-Agent': 'Neotoma Paleoecology Database API',
407407
},
408408
signal: AbortSignal.timeout(5000),
409+
}).catch((err) => {
410+
res.status(500)
411+
.json({
412+
status: 'failure',
413+
data: null,
414+
message: err.message,
415+
});
409416
});
410417
if (!maps.ok) {
411418
res.status(500)

0 commit comments

Comments
 (0)