diff --git a/server/routes/radarr.js b/server/routes/radarr.js index fcfc6e5..c697f0f 100644 --- a/server/routes/radarr.js +++ b/server/routes/radarr.js @@ -66,6 +66,7 @@ router.get('/notifications', async (req, res) => { }); res.json(response.data); } catch (error) { + console.error('[Radarr] Failed to fetch notifications:', error.message); res.status(500).json({ error: 'Failed to fetch Radarr notifications', details: sanitizeError(error) }); } }); @@ -126,6 +127,11 @@ router.post('/notifications/test', async (req, res) => { }); res.json(response.data); } catch (error) { + console.error('[Radarr] Failed to test notification:', error.message); + if (error.response) { + console.error('[Radarr] Test response status:', error.response.status); + console.error('[Radarr] Test response data:', error.response.data); + } res.status(500).json({ error: 'Failed to test Radarr notification', details: sanitizeError(error) }); } }); @@ -199,6 +205,11 @@ router.post('/notifications/sofarr-webhook', async (req, res) => { res.json(response.data); } } catch (error) { + console.error('[Radarr] Failed to configure webhook:', error.message); + if (error.response) { + console.error('[Radarr] Response status:', error.response.status); + console.error('[Radarr] Response data:', error.response.data); + } res.status(500).json({ error: 'Failed to configure Sofarr webhook', details: sanitizeError(error) }); } }); diff --git a/server/routes/sonarr.js b/server/routes/sonarr.js index 9e4d4a4..8d6b6d4 100644 --- a/server/routes/sonarr.js +++ b/server/routes/sonarr.js @@ -66,6 +66,7 @@ router.get('/notifications', async (req, res) => { }); res.json(response.data); } catch (error) { + console.error('[Sonarr] Failed to fetch notifications:', error.message); res.status(500).json({ error: 'Failed to fetch Sonarr notifications', details: sanitizeError(error) }); } }); @@ -126,6 +127,11 @@ router.post('/notifications/test', async (req, res) => { }); res.json(response.data); } catch (error) { + console.error('[Sonarr] Failed to test notification:', error.message); + if (error.response) { + console.error('[Sonarr] Test response status:', error.response.status); + console.error('[Sonarr] Test response data:', error.response.data); + } res.status(500).json({ error: 'Failed to test Sonarr notification', details: sanitizeError(error) }); } }); @@ -199,6 +205,11 @@ router.post('/notifications/sofarr-webhook', async (req, res) => { res.json(response.data); } } catch (error) { + console.error('[Sonarr] Failed to configure webhook:', error.message); + if (error.response) { + console.error('[Sonarr] Response status:', error.response.status); + console.error('[Sonarr] Response data:', error.response.data); + } res.status(500).json({ error: 'Failed to configure Sofarr webhook', details: sanitizeError(error) }); } });