Skip to content

Commit

Permalink
redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Jan 23, 2025
1 parent 58e40aa commit 9d7809f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions packages/fern-docs/bundle/src/server/DocsLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,19 @@ export class DocsLoader {
> {
if (!this.#loadForDocsUrlResponse) {
try {
return await loadDocsDefinitionFromS3({
const response = await loadDocsDefinitionFromS3({
domain: this.domain,
docsDefinitionUrl: this.getDocsDefinitionUrl(),
});
} catch {
if (response == null) {
throw new Error(
`Failed to load docs definition for domain: ${this.domain}`
);
}
this.#loadForDocsUrlResponse = response;
} catch (error) {
// Not served by cloudfront, fetch from Redis and then RDS
console.error("Failed to load docs definition from S3:", error);
const response = await loadWithUrl(this.domain);
if (response.ok) {
this.#loadForDocsUrlResponse = response.body;
Expand Down
2 changes: 1 addition & 1 deletion packages/fern-docs/ui/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"FERN_TOKEN",
"NEXT_DEPLOYMENT_ID",
"NEXT_PUBLIC_FDR_ORIGIN",
"NEXT_PUBLIC_VERCEL_ENV",
"NEXT_PUBLIC_VERCEL_ENV",
"NEXT_PUBLIC_DOCS_DEFINITION_S3_URL"
],
"inputs": ["$TURBO_DEFAULT$"]
Expand Down

0 comments on commit 9d7809f

Please sign in to comment.