Skip to content

fix: harden DataForSEO empty-result handling#27

Open
Gujiassh wants to merge 1 commit intoTheCraigHewitt:mainfrom
Gujiassh:fix/dataforseo-empty-result
Open

fix: harden DataForSEO empty-result handling#27
Gujiassh wants to merge 1 commit intoTheCraigHewitt:mainfrom
Gujiassh:fix/dataforseo-empty-result

Conversation

@Gujiassh
Copy link
Copy Markdown

Summary

  • centralize first-task/first-result guards in the DataForSEO client instead of indexing directly into tasks[0] / result[0]
  • harden the most-used public methods (get_serp_data, analyze_competitor, get_keyword_ideas, get_questions, get_domain_metrics, check_ranking_history) against empty payloads
  • add focused no-network regression coverage for missing task/result scenarios

Validation

  • python3 -m py_compile data_sources/modules/dataforseo.py tests/test_dataforseo_resilience.py
  • python3 -m unittest tests.test_dataforseo_resilience

Notes

  • this stays independent from #26, which only restored the GA page-performance compatibility contract

Stop the SEO data pipeline from crashing on empty task/result payloads by centralizing first-task/first-result guards in the DataForSEO client.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant