Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 8cd8171

Browse files
authored
DOP-3659: Adjust OpenAPI build logs (#809)
remove async error log, add more info to edge case log
1 parent 7fbbce9 commit 8cd8171

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/oas-page-builder/src/services/pageBuilder.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,17 @@ const getAtlasSpecUrl = async ({ apiKeyword, apiVersion, resourceVersion }: Atla
8181
// hash in our database.
8282
await fetchTextData(oasFileURL, `Error fetching data from ${oasFileURL}`);
8383
} catch (e) {
84-
console.error(e);
84+
const unsuccessfulOasFileURL = oasFileURL;
8585
successfulGitHash = false;
8686

8787
const res = await findLastSavedVersionData(apiKeyword);
8888
if (res) {
8989
ensureSavedVersionDataMatches(res.versions, apiVersion, resourceVersion);
9090
oasFileURL = `${OAS_FILE_SERVER}${res.gitHash}${versionExtension}.json`;
91-
console.log(`Using ${oasFileURL}`);
91+
console.log(`Error occurred fetching from newest OAS spec at ${unsuccessfulOasFileURL}.\n
92+
This error is a rare but expected result of upload timing between gitHashes and specs.\n
93+
If you see this error multiple times, let the DOP team know!\n\n
94+
Using last successfully fetched OAS spec at ${oasFileURL}!`);
9295
} else {
9396
throw new Error(`Could not find a saved hash for API: ${apiKeyword}`);
9497
}

0 commit comments

Comments
 (0)