Skip to content

Commit

Permalink
Reduce to 5 seconds for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
clari182 committed Dec 18, 2024
1 parent 21c9725 commit 47a1be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/gatsby-site/netlify/functions/parseNews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports.handler = async function (event) {
// Runs first with { cookies: false },
// then on error recurses with { cookies: true } as a fallback.
const getArticle = async (url, config) => {
const TIMEOUT_DURATION = 10000; // Timeout after 10 seconds
const TIMEOUT_DURATION = 5000; // Timeout after 10 seconds

const timeoutPromise = new Promise((_, reject) =>
setTimeout(() => reject(new Error('Parser.parse timed out')), TIMEOUT_DURATION)
Expand Down

0 comments on commit 47a1be7

Please sign in to comment.