This prompt

Improve Error Handling
Improve the error handling in this code:
[Paste code]

Make failures clearer, safer, and easier to debug.
Keep the solution practical and not overly complex.

Related prompt

Improve Naming
Suggest better names for variables, functions and classes in this code:
[Paste code]
Explain why the new names are clearer.

All Coding prompts

Bug Diagnosis Prompt

Give the model the error, the code and what you expected. It ranks likely causes by evidence, tells you how to confirm each, and proposes a minimal fix.

View prompt →

Security Review

Review this code for common security issues. Focus on input validation, injection risks, secrets handling and unsafe defaults.

View prompt →

Unit Test Writing Prompt

Produces a case inventory first, then readable tests that check behavior at the boundaries, with suspected bugs flagged instead of encoded as passing.

View prompt →