error-sanitization

Log full error details server-side while exposing generic messages to users.

783|62|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/dadbodgeoff/drift --skill error-sanitization
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: error-sanitization
Source: https://github.com/dadbodgeoff/drift/tree/main/drift%20v1%20depreciated/skills/error-sanitization
Command: npx skills add https://github.com/dadbodgeoff/drift --skill error-sanitization

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents sensitive information like database strings, file paths, and API keys from being accidentally exposed to users in error messages, ensuring production safety.

Core Features & Use Cases

  • Production-Safe Error Logging: Logs full error details server-side for debugging while showing generic messages to users.
  • Information Leakage Prevention: Filters out sensitive patterns from user-facing error outputs.
  • Use Case: When a user encounters an error on your website, instead of seeing a cryptic database error, they see a simple "Operation failed. Please try again." while the full error is logged for developers.

Quick Start

Use the error-sanitization skill to create a safe HTTP exception for a given Python exception.

Frequently Asked Questions about error-sanitization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent sensitive data like database strings and API keys from leaking in API error messages?โ–ผ

To prevent sensitive data leakage in API error messages, you need production-safe error handling that logs full details server-side while exposing only generic messages to users. This technique filters out sensitive patterns like file paths and stack traces from user-facing outputs.

What is the best way to handle Python exceptions in production without exposing stack traces to users?โ–ผ

The best way to handle Python exceptions in production is implementing error sanitization that logs the full error server-side for debugging while showing users a generic message like "Operation failed." This prevents stack trace exposure while maintaining debuggability for developers.

Does this error sanitization approach support both Python and TypeScript environments?โ–ผ

Yes, this error sanitization approach supports both Python and TypeScript environments for API development and batch processing. It provides production-safe error handling capabilities across both programming languages to prevent sensitive information leakage.

How do I log full error details server-side while showing generic messages to users in my application?โ–ผ

To log full error details server-side while showing generic messages to users, implement an error handling mechanism that separates internal logging from external responses. Full error context is recorded for developers, while users receive safe, generic failure notifications.

Why should I use error sanitization for production API development?โ–ผ

You should use error sanitization for production API development because it prevents accidental exposure of sensitive information like database connection strings, file paths, and API keys. It ensures production safety by maintaining detailed server-side logs without compromising user-facing security.