Skip to content

Commit ee369af

Browse files
Copilothotlong
andcommitted
fix: address code review — null check for getObject, boot error logging
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 984f54b commit ee369af

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

apps/studio/api/_kernel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ async function bootKernel(): Promise<ObjectKernel> {
7373
} catch (err) {
7474
// Clear the lock so the next request can retry
7575
_bootPromise = null;
76+
console.error('[Vercel] Kernel boot failed:', (err as any)?.message || err);
7677
throw err;
7778
}
7879
})();

packages/runtime/src/http-dispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ export class HttpDispatcher {
400400
const qlService = await this.getObjectQLService();
401401
if (qlService?.registry) {
402402
const data = qlService.registry.getObject(name);
403-
return { handled: true, response: this.success(data) };
403+
if (data) return { handled: true, response: this.success(data) };
404404
}
405405
return { handled: true, response: this.error('Not found', 404) };
406406
}

0 commit comments

Comments
 (0)