Add logging to blocklist-search endpoint for debugging
CI / Tests & coverage (push) Failing after 31s
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m10s
CI / Security audit (push) Successful in 1m28s
CI / Tests & coverage (push) Failing after 31s
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m10s
CI / Security audit (push) Successful in 1m28s
- Log missing required fields to help diagnose blocklist issues - Shows which fields are present/absent in the request body
This commit is contained in:
@@ -255,6 +255,7 @@ router.post('/blocklist-search', requireAuth, async (req, res) => {
|
|||||||
const { arrQueueId, arrType, arrInstanceUrl, arrInstanceKey, arrContentId, arrContentType } = req.body;
|
const { arrQueueId, arrType, arrInstanceUrl, arrInstanceKey, arrContentId, arrContentType } = req.body;
|
||||||
|
|
||||||
if (!arrQueueId || !arrType || !arrInstanceUrl || !arrInstanceKey || !arrContentId || !arrContentType) {
|
if (!arrQueueId || !arrType || !arrInstanceUrl || !arrInstanceKey || !arrContentId || !arrContentType) {
|
||||||
|
console.error('[Blocklist] Missing required fields:', { arrQueueId, arrType, arrInstanceUrl, hasKey: !!arrInstanceKey, arrContentId, arrContentType });
|
||||||
return res.status(400).json({ error: 'Missing required fields' });
|
return res.status(400).json({ error: 'Missing required fields' });
|
||||||
}
|
}
|
||||||
if (arrType !== 'sonarr' && arrType !== 'radarr') {
|
if (arrType !== 'sonarr' && arrType !== 'radarr') {
|
||||||
|
|||||||
Reference in New Issue
Block a user