Core error reporting functions and utilities.
This namespace provides pure functions and higher-level abstractions over the error reporting protocols, making it easier for feature modules to report errors without dealing with protocol details directly.
Core error reporting functions and utilities. This namespace provides pure functions and higher-level abstractions over the error reporting protocols, making it easier for feature modules to report errors without dealing with protocol details directly.
(add-breadcrumb context message category level data)Adds a breadcrumb to the error context for tracking user actions.
Args: context - IErrorContext instance message - Breadcrumb message category - Breadcrumb category level - Breadcrumb level (:debug, :info, :warning, :error) data - Additional breadcrumb data
Returns: nil
Adds a breadcrumb to the error context for tracking user actions. Args: context - IErrorContext instance message - Breadcrumb message category - Breadcrumb category level - Breadcrumb level (:debug, :info, :warning, :error) data - Additional breadcrumb data Returns: nil
(build-error-context base-context extra-data)Builds a comprehensive error context map.
Args: base-context - Base context map extra-data - Additional context data
Returns: Complete error context map
Builds a comprehensive error context map. Args: base-context - Base context map extra-data - Additional context data Returns: Complete error context map
(classify-exception exception)Classifies an exception by type and characteristics.
Args: exception - Exception instance
Returns: Classification map with :type, :category, :severity
Classifies an exception by type and characteristics. Args: exception - Exception instance Returns: Classification map with :type, :category, :severity
(create-default-sensitive-keys)Creates a default set of sensitive keys to filter from error reports.
Returns: Set of sensitive key names
Creates a default set of sensitive keys to filter from error reports. Returns: Set of sensitive key names
(create-error-fingerprint exception context)Creates a fingerprint for error grouping.
Args: exception - Exception instance context - Error context
Returns: Fingerprint string for grouping similar errors
Creates a fingerprint for error grouping. Args: exception - Exception instance context - Error context Returns: Fingerprint string for grouping similar errors
(error-context->reporting-context error-context)Convert enhanced error context to error reporting context format.
Transforms the enhanced error context from Problem Details into the format expected by the error reporting system, ensuring compatibility and proper context preservation.
Args: error-context - Enhanced error context map from Problem Details
Returns: Error reporting context map with proper structure
Convert enhanced error context to error reporting context format. Transforms the enhanced error context from Problem Details into the format expected by the error reporting system, ensuring compatibility and proper context preservation. Args: error-context - Enhanced error context map from Problem Details Returns: Error reporting context map with proper structure
(extract-cause-chain exception)Extract the cause chain from an exception into a nested structure.
Args: exception - Exception instance
Returns: Nested map representing the cause chain, or nil if no cause
Extract the cause chain from an exception into a nested structure. Args: exception - Exception instance Returns: Nested map representing the cause chain, or nil if no cause
(merge-error-configs & configs)Merges multiple error reporting configurations.
Args: configs - Variable number of configuration maps
Returns: Merged configuration map
Merges multiple error reporting configurations. Args: configs - Variable number of configuration maps Returns: Merged configuration map
(report-and-continue reporter exception message context)Reports an exception but doesn't re-throw it.
Args: reporter - IErrorReporter instance exception - Exception to report message - Error message context - Error context
Returns: Error ID string
Reports an exception but doesn't re-throw it. Args: reporter - IErrorReporter instance exception - Exception to report message - Error message context - Error context Returns: Error ID string
(report-application-error reporter exception message context)Reports an application error with full context.
Args: reporter - IErrorReporter instance exception - Exception instance message - Descriptive error message context - Error context map
Returns: Error ID string
Reports an application error with full context. Args: reporter - IErrorReporter instance exception - Exception instance message - Descriptive error message context - Error context map Returns: Error ID string
(report-enhanced-application-error reporter
exception
message
context
error-context)Reports an application error with enhanced context from Problem Details.
This function bridges the enhanced error context from our Problem Details implementation with the error reporting system, ensuring all context information is properly preserved for debugging.
Args: reporter - IErrorReporter instance exception - Exception instance message - Descriptive error message context - Standard error context map error-context - Enhanced error context from Problem Details
Returns: Error ID string
Reports an application error with enhanced context from Problem Details. This function bridges the enhanced error context from our Problem Details implementation with the error reporting system, ensuring all context information is properly preserved for debugging. Args: reporter - IErrorReporter instance exception - Exception instance message - Descriptive error message context - Standard error context map error-context - Enhanced error context from Problem Details Returns: Error ID string
(report-external-service-error reporter service-name operation error context)Reports external service errors.
Args: reporter - IErrorReporter instance service-name - Name of external service operation - Operation that failed error - Error information context - Error context map
Returns: Error ID string
Reports external service errors. Args: reporter - IErrorReporter instance service-name - Name of external service operation - Operation that failed error - Error information context - Error context map Returns: Error ID string
(report-security-incident reporter incident details context)Reports security-related incidents.
Args: reporter - IErrorReporter instance incident - Incident type details - Incident details context - Error context map
Returns: Error ID string
Reports security-related incidents. Args: reporter - IErrorReporter instance incident - Incident type details - Incident details context - Error context map Returns: Error ID string
(report-validation-error reporter errors context)Reports validation errors in a structured format.
Args: reporter - IErrorReporter instance errors - Validation error data context - Error context map
Returns: Error ID string
Reports validation errors in a structured format. Args: reporter - IErrorReporter instance errors - Validation error data context - Error context map Returns: Error ID string
(sanitize-context context sensitive-keys)Removes sensitive information from error context.
Args: context - Context map sensitive-keys - Set of keys to remove or mask
Returns: Sanitized context map
Removes sensitive information from error context. Args: context - Context map sensitive-keys - Set of keys to remove or mask Returns: Sanitized context map
(should-report-exception? exception config)Determines if an exception should be reported based on classification.
Args: exception - Exception instance config - Error reporting configuration
Returns: Boolean indicating whether to report
Determines if an exception should be reported based on classification. Args: exception - Exception instance config - Error reporting configuration Returns: Boolean indicating whether to report
(should-suppress-duplicate? fingerprint recent-reports suppress-window)Determines if a duplicate error should be suppressed.
Args: fingerprint - Error fingerprint recent-reports - Map of recent error reports suppress-window - Time window for suppression in ms
Returns: Boolean indicating whether to suppress
Determines if a duplicate error should be suppressed. Args: fingerprint - Error fingerprint recent-reports - Map of recent error reports suppress-window - Time window for suppression in ms Returns: Boolean indicating whether to suppress
(track-user-action context action target)Tracks user actions as breadcrumbs.
Args: context - IErrorContext instance action - Action performed target - Target of the action
Returns: nil
Tracks user actions as breadcrumbs. Args: context - IErrorContext instance action - Action performed target - Target of the action Returns: nil
(track-user-navigation context path method)Tracks user navigation as breadcrumbs.
Args: context - IErrorContext instance path - Navigation path method - HTTP method (for API calls)
Returns: nil
Tracks user navigation as breadcrumbs. Args: context - IErrorContext instance path - Navigation path method - HTTP method (for API calls) Returns: nil
(with-error-reporting reporter context f)Wraps a function with automatic error reporting.
Args: reporter - IErrorReporter instance context - Base error context f - Function to wrap
Returns: Result of function f, or re-throws exception after reporting
Wraps a function with automatic error reporting. Args: reporter - IErrorReporter instance context - Base error context f - Function to wrap Returns: Result of function f, or re-throws exception after reporting
(with-fallback-error-reporting reporter context fallback f)Wraps a function with error reporting and fallback value.
Args: reporter - IErrorReporter instance context - Base error context fallback - Fallback value to return on error f - Function to wrap
Returns: Result of function f, or fallback value if exception occurs
Wraps a function with error reporting and fallback value. Args: reporter - IErrorReporter instance context - Base error context fallback - Fallback value to return on error f - Function to wrap Returns: Result of function f, or fallback value if exception occurs
(with-operation-context context operation entity action)Adds operation/business context to error reporting.
Args: context - Existing context map operation - Operation being performed entity - Business entity involved action - Specific action
Returns: Updated context map
Adds operation/business context to error reporting. Args: context - Existing context map operation - Operation being performed entity - Business entity involved action - Specific action Returns: Updated context map
(with-request-context context request-id method path headers)Adds HTTP request information to error context.
Args: context - Existing context map request-id - Request identifier method - HTTP method path - Request path headers - Request headers (sensitive data filtered)
Returns: Updated context map
Adds HTTP request information to error context. Args: context - Existing context map request-id - Request identifier method - HTTP method path - Request path headers - Request headers (sensitive data filtered) Returns: Updated context map
(with-user-context context user-id user-info)Adds user information to error context.
Args: context - Existing context map user-id - User identifier user-info - Additional user information
Returns: Updated context map
Adds user information to error context. Args: context - Existing context map user-id - User identifier user-info - Additional user information Returns: Updated context map
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |