io.pedestal.connector.dev

added in 0.8.0

Optional interceptors and support code used when developing and debugging.

default-debug-observer-omit

(default-debug-observer-omit key-path)

Default for key paths to ignore when using debug-observer. This is primarily the request and response bodies, anything private to the io.pedestal.interceptor.chain namespaces, and a few routing-related keys (that produce non-useful logged output).

uncaught-exception

A development-mode interceptor that captures exceptions, formats them using org.clj-commons/pretty, and generates a status 500 text response of the formatted exception.

with-dev-interceptors

(with-dev-interceptors connector-map)

Adds the dev-allow-origin and exception-debug interceptors; these should be used only during local development, and should come before other interceptors.

with-interceptor-observer

(with-interceptor-observer connector-map)(with-interceptor-observer connector-map debug-observer-options)

Adds debug-observer as a context observer for all request executions. By default, uses default-debug-observer-omit to omit internal or overly verbose context map keys.

The debug observer should not be enabled in production: it is somewhat expensive to identify changes to the context, and some data in the context that might be logged can be verbose, sensitive, or both.

This modifies the :initial-context key of the service map.