The Prompt Library
CodingDebugging

Identify Edge Case Failures

Find edge cases that might break your code or cause silent errors.

Select Model:

Prompt:

Please review my code and identify potential edge cases that could cause failures, unexpected behavior, or security vulnerabilities. I want to make my implementation more robust by addressing scenarios I might have overlooked. CODE/ALGORITHM: ``` [CODE_OR_ALGORITHM_DESCRIPTION] ``` CONTEXT: - Purpose: [PURPOSE_OF_CODE] - Main functionality: [FUNCTIONALITY_DESCRIPTION] - Expected inputs: [EXPECTED_INPUTS] - Expected outputs: [EXPECTED_OUTPUTS] - Environment: [ENVIRONMENT_DETAILS] - Constraints: [CONSTRAINTS] Please provide: 1. EDGE CASE IDENTIFICATION - Input boundary conditions - Unexpected input types or formats - Empty, null, or missing values - Extremely large or small inputs - Resource limitations - Timing and concurrency issues - Error conditions and exception scenarios - System state anomalies 2. IMPACT ANALYSIS - How each edge case could affect the code - Silent failures (incorrect results without errors) - Potential crashes or exceptions - Security implications - Performance concerns - Data integrity issues - User experience impacts 3. MITIGATION RECOMMENDATIONS - Specific code changes to handle each edge case - Input validation strategies - Error handling improvements - Security enhancements - Performance optimizations - Logging and monitoring suggestions - Defensive programming techniques 4. TESTING STRATEGIES - Test cases for each identified edge case - Unit testing approaches - Integration testing considerations - Stress and load testing methods - Security testing techniques - Automation suggestions - Verification methods Please prioritize the edge cases by severity and likelihood, focusing on those that present the greatest risk to the functionality, security, or performance of my code.

Related Prompts

Other prompts you might find useful

CodingDebugging

General Debugging Assistant

Walk through a bug or error step-by-step to find the issue.

6 models availableView details
CodingDebugging

Read and Explain Stack Trace

Interpret error logs or stack traces from any programming language.

6 models availableView details
CodingDebugging

Fix a Logic Bug

Describe unexpected behavior and get help correcting your logic.

6 models availableView details
CodingDebugging

Identify Edge Case Failures

Find edge cases that might break your code or cause silent errors.

6 models availableView details