Skip to content

improve error handling and add negative tests for DeckService#2774

Open
theanand108 wants to merge 1 commit intoOWASP:masterfrom
theanand108:patch-1
Open

improve error handling and add negative tests for DeckService#2774
theanand108 wants to merge 1 commit intoOWASP:masterfrom
theanand108:patch-1

Conversation

@theanand108
Copy link
Copy Markdown
Contributor

@theanand108 theanand108 commented Apr 8, 2026

Description

Improves error handling in DeckService when markdown files are missing and adds negative test cases to improve branch coverage.

Changes include:

  • Adding contextual logging using console.warn and console.error
  • Adding negative tests for missing files and error scenarios to ensure better coverage of error handling paths

This improves maintainability and debugging while keeping the existing architecture unchanged.

Resolved or fixed issue: #2747


AI Tool Disclosure

  • My contribution includes AI-generated content, as disclosed below:
    • AI Tools: ChatGPT
    • LLMs and versions: GPT-5.3
    • Prompts: Guidance on improving error handling and writing negative test cases for DeckService

Affirmation

  • My code follows the CONTRIBUTING.md guidelines

@theanand108 theanand108 force-pushed the patch-1 branch 8 times, most recently from 93ddeee to 0ae4a87 Compare April 9, 2026 13:33
- Added contextual logging for missing markdown files
- Added a minimal targeted test to satisfy branch coverage threshold
- Removed unnecessary test additions to keep changes focused
- No production code changes
@theanand108
Copy link
Copy Markdown
Contributor Author

Hi @sydseter,

I’ve addressed the feedback regarding test coverage.

The changes have been reduced to a minimal, targeted test addition that covers the previously untested edge branches and brings the overall branch coverage above the required threshold.

I also removed unrelated or excessive changes to keep the PR focused strictly on improving test coverage, without modifying existing logic.

Please let me know if any further adjustments are needed.

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