Increase getDocument timeout to 20s to prevent failing while the API is normalizing documents (#264)

This commit is contained in:
Johan Preynat
2024-03-14 20:35:00 +01:00
committed by GitHub
parent 80d45c3ff7
commit 654a9e6227
+6
View File
@@ -559,6 +559,12 @@ export const getDocument = cache(
);
return cacheResponse(response, immutableCacheTtl_7days);
},
{
// Temporarily allow for a longer timeout than the default 10s
// because GitBook's API currently re-normalizes all documents
// and it can take more than 10s...
timeout: 20 * 1000,
},
);
/**