{"record":{"id":"36360434149a5e8f","repo":"apache/superset","slug":"report-schedule-parameters-are-invalid","errorCode":null,"errorMessage":"Report Schedule parameters are invalid.","messagePattern":"Report Schedule parameters are invalid\\.","errorType":"validation","errorClass":"ReportScheduleInvalidError","httpStatus":422,"severity":"error","filePath":"superset/commands/report/create.py","lineNumber":170,"sourceCode":"        # Validate that each chart or dashboard only has one report with\n        # the respective creation method.\n        if (\n            creation_method != ReportCreationMethod.ALERTS_REPORTS\n            and not ReportScheduleDAO.validate_unique_creation_method(\n                dashboard_id, chart_id\n            )\n        ):\n            raise ReportScheduleCreationMethodUniquenessValidationError()\n\n        if \"validator_config_json\" in self._properties:\n            self._properties[\"validator_config_json\"] = json.dumps(\n                self._properties[\"validator_config_json\"]\n            )\n\n        self._populate_subjects(exceptions)\n\n        if exceptions:\n            raise ReportScheduleInvalidError(exceptions=exceptions)\n","sourceCodeStart":152,"sourceCodeEnd":171,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/create.py#L152-L171","documentation":"ReportScheduleInvalidError is raised at the end of CreateReportCommand.validate when the run accumulated per-field validation exceptions (marshmallow-level field errors from validate_chart_dashboard, _validate_report_extra, _populate_subjects, etc.). The 'exceptions' list carries the detailed field messages; this error is the aggregation envelope.","triggerScenarios":"POST /api/v1/report/ with any invalid field combination — a nonexistent chart_id/dashboard_id, malformed recipients in the extra JSON, invalid validator_config_json, or bad crontab — such that validate() appends to the exceptions list.","commonSituations":"Automation posting partial payloads (missing recipients, wrong notification type), typos in recipient addresses, chart moved between environments so its id no longer resolves, extra JSON missing the notification configuration block.","solutions":["Inspect the API 422 response body — the exceptions list names the exact invalid fields","Fix each reported field (valid chart/dashboard id, well-formed recipients list, valid crontab)","Re-run creation; validation is all-or-nothing so every exception must be cleared"],"exampleFix":"# before\nresponse = client.post('/api/v1/report/', json={'chart_id': 999999, ...})  # nonexistent chart\n\n# after\nchart = client.get('/api/v1/chart/123').json  # verify target exists first\nresponse = client.post('/api/v1/report/', json={'chart_id': chart['id'], ...})","handlingStrategy":"try-catch","validationCode":"# pre-flight the common causes: target exists and extra is well-formed\nassert client.get(f'/api/v1/chart/{chart_id}').status_code == 200\njson.dumps(extra['recipients'])  # must serialize and contain valid addresses","typeGuard":null,"tryCatchPattern":"try:\n    CreateReportCommand(user, payload).run()\nexcept ReportScheduleInvalidError as ex:\n    # ex.exceptions carries per-field messages; surface them to the form\n    for field_error in ex.exceptions:\n        mark_invalid(field_error)","preventionTips":["Validate every foreign-key id (chart, dashboard, database) with a GET before POST","Keep the extra JSON schema (recipients, notification type) identical to what the UI produces","Treat the aggregated exceptions list as the source of truth; fix all fields before retry"],"tags":["alerts-reports","validation","api"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}