File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
packages/sandbox/src/opencode Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,20 @@ async function ensureOpencodeServer(
124124 ) ;
125125 // Wait for the concurrent server to be ready
126126 if ( retryProcess . status === 'starting' ) {
127- await retryProcess . waitForPort ( port , {
128- mode : 'http' ,
129- path : '/' ,
130- timeout : 60_000
131- } ) ;
127+ try {
128+ await retryProcess . waitForPort ( port , {
129+ mode : 'http' ,
130+ path : '/' ,
131+ timeout : 60_000
132+ } ) ;
133+ } catch ( e ) {
134+ const logs = await retryProcess . getLogs ( ) ;
135+ throw new OpencodeStartupError (
136+ `OpenCode server failed to start. Stderr: ${ logs . stderr || '(empty)' } ` ,
137+ { port, stderr : logs . stderr , command : retryProcess . command } ,
138+ { cause : e }
139+ ) ;
140+ }
132141 }
133142 return retryProcess ;
134143 }
You can’t perform that action at this time.
0 commit comments