Skip to content

Commit ab30d00

Browse files
Update app/api/files/sandbox/list/route.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7acbca5 commit ab30d00

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

app/api/files/sandbox/list/route.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ const E2B_API_KEY = process.env.E2B_API_KEY
3333
const sandboxTimeout = 10 * 60 * 1000
3434

3535
export async function GET(request: NextRequest) {
36+
if (!E2B_API_KEY) {
37+
return NextResponse.json(
38+
{ error: 'E2B_API_KEY environment variable not found' },
39+
{ status: 500 },
40+
)
41+
}
3642
try {
37-
if (!E2B_API_KEY) {
38-
return NextResponse.json(
39-
{ error: 'E2B_API_KEY environment variable not found' },
40-
{ status: 500 },
41-
)
42-
}
43-
4443
const searchParams = request.nextUrl.searchParams
4544
const sandboxId = searchParams.get('sandboxId')
4645

0 commit comments

Comments
 (0)