Universal interceptors for cross-cutting concerns.
These interceptors handle common infrastructure concerns like logging, metrics, error handling, and context management across all modules.
Universal interceptors for cross-cutting concerns. These interceptors handle common infrastructure concerns like logging, metrics, error handling, and context management across all modules.
(add-error-handling pipeline)Adds error handling interceptors to any pipeline.
Adds error handling interceptors to any pipeline.
Base pipeline with essential observability interceptors. Suitable for most operations that don't need specialized handling.
Base pipeline with essential observability interceptors. Suitable for most operations that don't need specialized handling.
CLI-specific pipeline with command/response handling.
CLI-specific pipeline with command/response handling.
Establishes basic context for request processing.
Adds:
Establishes basic context for request processing. Adds: - :correlation-id - UUID for request tracing - :now - Current timestamp - Ensures :op is present for operation identification
(convert-exception-to-response ctx)Converts an exception in the context into an appropriate HTTP error response. Uses error mappings from the context to map domain-specific error types to HTTP responses.
Converts an exception in the context into an appropriate HTTP error response. Uses error mappings from the context to map domain-specific error types to HTTP responses.
(create-cli-pipeline & custom-interceptors)Creates a complete CLI pipeline with custom interceptors.
Creates a complete CLI pipeline with custom interceptors.
(create-http-pipeline & custom-interceptors)Creates a complete HTTP pipeline with custom interceptors inserted at the appropriate point.
Creates a complete HTTP pipeline with custom interceptors inserted at the appropriate point.
Executes side effects returned by core functions.
Processes the :effects vector from core function results and executes each effect, collecting any errors for later handling.
Executes side effects returned by core functions. Processes the :effects vector from core function results and executes each effect, collecting any errors for later handling.
Captures exceptions in error reporting system.
Captures exceptions in error reporting system.
Error handling interceptors for exception management.
Error handling interceptors for exception management.
Generic error normalization interceptor that works with context error mappings. This runs in the :error phase when actual exceptions are thrown during pipeline execution.
Generic error normalization interceptor that works with context error mappings. This runs in the :error phase when actual exceptions are thrown during pipeline execution.
Converts failed contexts (halted with exceptions) into proper HTTP error responses. Runs in both leave and error phases to catch contexts that were halted by fail-with-exception or had exceptions during pipeline execution.
Uses error mappings from the context to map domain-specific error types to HTTP responses.
Converts failed contexts (halted with exceptions) into proper HTTP error responses. Runs in both leave and error phases to catch contexts that were halted by fail-with-exception or had exceptions during pipeline execution. Uses error mappings from the context to map domain-specific error types to HTTP responses.
HTTP-specific pipeline with request/response handling.
HTTP-specific pipeline with request/response handling.
Logs successful completion of an operation with timing information.
Logs successful completion of an operation with timing information.
Logs operation failures with error details.
Logs operation failures with error details.
Logs the start of an operation with structured data.
Logs the start of an operation with structured data.
Records operation completion metrics including success/failure and latency.
Records operation completion metrics including success/failure and latency.
Records operation failure metrics when exceptions occur.
Records operation failure metrics when exceptions occur.
Records operation attempt and starts timing measurement.
Records operation attempt and starts timing measurement.
Shapes results into CLI response format with exit codes.
This interceptor handles both :result format (with :status/:data/:errors) and :response format (direct CLI response) to maintain compatibility.
For error responses already set by error handling interceptors, converts HTTP-style responses to CLI format with detailed error messages.
Shapes results into CLI response format with exit codes. This interceptor handles both :result format (with :status/:data/:errors) and :response format (direct CLI response) to maintain compatibility. For error responses already set by error handling interceptors, converts HTTP-style responses to CLI format with detailed error messages.
Shapes successful results into HTTP response format.
Shapes successful results into HTTP response format.
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 |