fix: set error type

This commit is contained in:
karishmas6
2024-10-17 18:38:43 +05:30
parent 6401fae8f7
commit 4d68478011

View File

@@ -350,7 +350,7 @@ router.post('/gsheets/update', requireSignIn, async (req, res) => {
await robot.update({ google_sheet_id: spreadsheetId });
res.json({ message: 'Robot updated with selected Google Sheet ID' });
} catch (error) {
} catch (error: any) {
res.status(500).json({ message: `Error updating robot: ${error.message}` });
}
});