Skip to content

Commit 165ed98

Browse files
feedback
1 parent 5e16c10 commit 165ed98

File tree

1 file changed

+1
-7
lines changed
  • packages/web/src/app/api/(server)/openapi.json

1 file changed

+1
-7
lines changed

packages/web/src/app/api/(server)/openapi.json/route.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ export const dynamic = 'force-dynamic';
66

77
async function loadOpenApiDocument() {
88
const openApiPath = path.resolve(process.cwd(), '../../docs/api-reference/sourcebot-public.openapi.json');
9-
try {
10-
return JSON.parse(await fs.readFile(openApiPath, 'utf8'));
11-
} catch (error) {
12-
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {
13-
throw error;
14-
}
15-
}
9+
return JSON.parse(await fs.readFile(openApiPath, 'utf8'));
1610
}
1711

1812
export const GET = apiHandler(async () => {

0 commit comments

Comments
 (0)