We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e16c10 commit 165ed98Copy full SHA for 165ed98
packages/web/src/app/api/(server)/openapi.json/route.ts
@@ -6,13 +6,7 @@ export const dynamic = 'force-dynamic';
6
7
async function loadOpenApiDocument() {
8
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
+ return JSON.parse(await fs.readFile(openApiPath, 'utf8'));
16
}
17
18
export const GET = apiHandler(async () => {
0 commit comments