SelectoComponents.ErrorHandling.ErrorSanitizer (selecto_components v0.4.5)
Sanitizes error messages for production environments to prevent sensitive information leakage.
Link to this section Summary
Functions
Determines if the current environment is production.
Returns production-safe suggestions based on error type.
Sanitizes error details map for production.
Sanitizes an error for display based on the current environment. In production, removes sensitive details like SQL queries, parameters, and stack traces.
Sanitizes suggestions to be production-safe.
Returns a safe, user-friendly error message based on error type.
Link to this section Functions
production_env?()
Determines if the current environment is production.
safe_suggestions(error_type)
Returns production-safe suggestions based on error type.
sanitize_details(details, opts \\ [])
Sanitizes error details map for production.
sanitize_error(error, opts \\ [])
Sanitizes an error for display based on the current environment. In production, removes sensitive details like SQL queries, parameters, and stack traces.
sanitize_suggestions(suggestions)
Sanitizes suggestions to be production-safe.
user_friendly_message(error_type)
Returns a safe, user-friendly error message based on error type.