1 Keep the useful context #

  • Include the smallest complete sample that still fails.
  • Keep indentation intact — that is often where the bug lives.
  • Add the error message verbatim, including the exit code or HTTP status.
  • Say which language, runtime, and version you used when it matters.
  • Trim the log noise: repeated stack frames, unrelated warnings, timestamps you do not need.

2 Review before sending #

Search the snippet for these before you send it:

  • Access tokens, API keys, Authorization headers, cookies
  • Passwords, private keys, connection strings
  • Internal hostnames, private IP addresses, local file paths
  • Customer names and identifiers in test data

Warning

CopyPasta never executes pasted code and never loads remote resources from it, but the reader may run what you send. Remove the credentials first — an expiration date is not a security control for secrets.

Start with how to protect sensitive text for the classification checklist, and choosing an expiration for anything temporary.