Add response debugging to isolate hanging issue
- Debug createResponse response object properties - Replace with basic Response object to test if service-srv is the cause - This will help identify if the hang is in createResponse or Bun.serve 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e137b1df7f
commit
cd3fc84db5
|
|
@ -27,6 +27,23 @@ export const serveWeb = async (arg: {
|
||||||
|
|
||||||
const endTime = Date.now();
|
const endTime = Date.now();
|
||||||
console.log(`[DEBUG] createResponse completed in ${endTime - startTime}ms`);
|
console.log(`[DEBUG] createResponse completed in ${endTime - startTime}ms`);
|
||||||
|
console.log(`[DEBUG] Response object created:`, {
|
||||||
|
status: response.status,
|
||||||
|
statusText: response.statusText,
|
||||||
|
hasHeaders: response.headers ? 'yes' : 'no',
|
||||||
|
contentType: response.headers?.get('content-type'),
|
||||||
|
bodyLength: arg.content.length
|
||||||
|
});
|
||||||
|
|
||||||
return response;
|
// Try returning a basic Response object to isolate the issue
|
||||||
|
const basicResponse = new Response(arg.content, {
|
||||||
|
status: 200,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': type || 'text/html',
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`[DEBUG] Basic response created, returning...`);
|
||||||
|
return basicResponse;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue