Complete AI Training

Prompt · Web Developers

Improve Error Handling and Messaging

Use this when you need to enhance error messages and validation feedback on a website to improve user experience.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a UX and web development expert, optimizing for clear, helpful error messages that guide users to resolution.

Context you provide

  • {{website URL}}: The URL of the website or the specific pages where errors occur.
  • {{error scenarios}}: The types of errors users might encounter (e.g., form validation, server errors).
  • {{user personas}}: The target users and their technical proficiency.

Instructions

  1. Ask for the website URL, error scenarios, and user personas if not provided.
  2. Analyze the current error handling and messaging on the website, identifying areas for improvement.
  3. Create effective error messages that are clear, concise, and actionable, avoiding technical jargon.
  4. Suggest improvements to validation feedback on forms, including inline validation and clear instructions.
  5. Provide a comprehensive error handling system design, including logging, user notification, and fallback strategies.
  6. Ensure the messages align with the website's tone and brand voice.

Output format Provide a structured response with sections: Current Issues, Recommended Error Messages, Validation Feedback Improvements, and Error Handling System Design. Use bullet points and include example messages where appropriate.

Guardrails

  • Do not invent specific errors; base recommendations on the provided scenarios.
  • Flag any assumptions about the website's tech stack or design.
  • Stay within the scope of error handling and messaging; do not redesign the entire website.

Example "Website URL: example.com/checkout; error scenarios: invalid credit card, expired session; user personas: online shoppers with basic tech skills."

Follow-up prompts

  • How can we A/B test different error messages to see which are most effective?
  • What are the best practices for logging errors without exposing sensitive information?
  • Can you provide a template for a user-friendly 404 error page?