mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-06-30 05:49:36 +00:00
Fix TypeScript error in server.ts
- Handle error type properly in catch block - Check if error is instanceof Error before accessing message property - Provide fallback for unknown error types
This commit is contained in:
parent
14321ccbb5
commit
74373a129d
1 changed files with 2 additions and 1 deletions
|
|
@ -594,7 +594,8 @@ app.post('/api/sessions/:sessionId/input', async (req, res) => {
|
|||
|
||||
} catch (error) {
|
||||
console.error('Error sending input via tty-fwd:', error);
|
||||
res.status(500).json({ error: 'Failed to send input', details: error.message });
|
||||
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
||||
res.status(500).json({ error: 'Failed to send input', details: errorMessage });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue