Liking cljdoc? Tell your friends :D

kwill.anomkit

Utility functions for working with anomaly maps.

Utility functions for working with anomaly maps.
raw docstring

!clj/s

(! anomaly)

Throw anomaly as an ExceptionInfo.

Throw `anomaly` as an `ExceptionInfo`.
raw docstring

?!clj/s

(?! x)
(?! x & {:keys [extra-data]})

Throw x if it is an anomaly, else x.

Throw `x` if it is an anomaly, else `x`.
raw docstring

anomalyclj/s

(anomaly category)
(anomaly category message)
(anomaly category message data)
(anomaly category message data cause-ex)

Returns an anomaly map constructed from category and, optionally, message.

Returns an anomaly map constructed from `category` and, optionally, `message`.
raw docstring

anomaly?clj/s

(anomaly? x)

Returns true if x is an anomaly.

Returns true if `x` is an anomaly.
raw docstring

busyclj/s

(busy message)
(busy message data)
(busy message data cause-ex)

backoff and retry

backoff and retry
raw docstring

busy!clj/s

(busy! message)
(busy! message data)
(busy! message data cause-ex)

backoff and retry, throwing

backoff and retry, throwing
raw docstring

busy?clj/s

(busy? x)

categoriesclj/s

Set of all anomaly categories.

Set of all anomaly categories.
raw docstring

categoryclj/s

(category x)

Returns the anomaly category of x.

Returns the anomaly category of `x`.
raw docstring

category->http-statusclj/s

A default mapping from anomaly category to an HTTP status code. Note that a single category can map to multiple HTTP status codes.

A default mapping from anomaly category to an HTTP status code. Note that a
single category can map to multiple HTTP status codes.
raw docstring

category-from-http-statusclj/s

(category-from-http-status http-status)
(category-from-http-status http-status default-category)

conflictclj/s

(conflict message)
(conflict message data)
(conflict message data cause-ex)

coordinate with callee

coordinate with callee
raw docstring

conflict!clj/s

(conflict! message)
(conflict! message data)
(conflict! message data cause-ex)

coordinate with callee, throwing

coordinate with callee, throwing
raw docstring

conflict?clj/s

(conflict? x)

default-ex->anomaly-convertersclj/s


default-ex-anomalyclj/s

(default-ex-anomaly {:keys [throwable]})

exclj/s

(ex anomaly)

ex->anomalyclj/s

(ex->anomaly throwable)
(ex->anomaly throwable {:keys [converters default-converter]})

Returns an anomaly map from the given throwable. Optionally takes an argument map of the following keys: converters: Seq of functions where each function takes a map containing the throwable under the :throwable key and returns an anomaly map or nil if no anomaly can be produced from the converter. Defaults to default-ex->anomaly-converters. default-converter: The converter function called when no converter in :converters returns an anomaly map. Defaults to default-ex-anomaly.

Returns an anomaly map from the given `throwable`. Optionally takes an argument
map of the following keys:
  converters: Seq of functions where each function takes a map containing the
    throwable under the `:throwable` key and returns an anomaly map or nil if
    no anomaly can be produced from the converter. Defaults to [[default-ex->anomaly-converters]].
  default-converter: The converter function called when no converter in `:converters`
    returns an anomaly map. Defaults to [[default-ex-anomaly]].
raw docstring

ex-type->anomalyclj/smultimethod


faultclj/s

(fault message)
(fault message data)
(fault message data cause-ex)

fix callee bug

fix callee bug
raw docstring

fault!clj/s

(fault! message)
(fault! message data)
(fault! message data cause-ex)

fix callee bug, throwing

fix callee bug, throwing
raw docstring

fault?clj/s

(fault? x)

forbiddenclj/s

(forbidden message)
(forbidden message data)
(forbidden message data cause-ex)

fix caller creds

fix caller creds
raw docstring

forbidden!clj/s

(forbidden! message)
(forbidden! message data)
(forbidden! message data cause-ex)

fix caller creds, throwing

fix caller creds, throwing
raw docstring

forbidden?clj/s

(forbidden? x)

http-status->categoryclj/s

Map of HTTP status code to anomaly category.

Map of HTTP status code to anomaly category.
raw docstring

incorrectclj/s

(incorrect message)
(incorrect message data)
(incorrect message data cause-ex)

fix caller bug

fix caller bug
raw docstring

incorrect!clj/s

(incorrect! message)
(incorrect! message data)
(incorrect! message data cause-ex)

fix caller bug

fix caller bug
raw docstring

incorrect?clj/s

(incorrect? x)

interruptedclj/s

(interrupted message)
(interrupted message data)
(interrupted message data cause-ex)

stop interrupting

stop interrupting
raw docstring

interrupted!clj/s

(interrupted! message)
(interrupted! message data)
(interrupted! message data cause-ex)

stop interrupting, throwing

stop interrupting, throwing
raw docstring

interrupted?clj/s

(interrupted? x)

messageclj/s

(message x)

Returns the anomaly message of x.

Returns the anomaly message of `x`.
raw docstring

not-foundclj/s

(not-found message)
(not-found message data)
(not-found message data cause-ex)

fix caller noun

fix caller noun
raw docstring

not-found!clj/s

(not-found! message)
(not-found! message data)
(not-found! message data cause-ex)

fix caller noun, throwing

fix caller noun, throwing
raw docstring

not-found?clj/s

(not-found? x)

public-dataclj/s

(public-data anom-data)

Returns a map of the public data from anom-data.

Returns a map of the public data from `anom-data`.
raw docstring

retryable-categoriesclj/s

Set of anomaly categories that are retryable.

Set of anomaly categories that are retryable.
raw docstring

retryable?clj/s

(retryable? anomaly)

Returns true if a replay of the same activity might reasonably lead to a different outcome.

Returns true if a replay of the same activity might reasonably lead to a
different outcome.
raw docstring

someclj/s

(some x)

Returns x when x is an anomaly, else nil.

Returns x when x is an anomaly, else nil.
raw docstring

unavailableclj/s

(unavailable message)
(unavailable message data)
(unavailable message data cause-ex)

make sure callee healthy

make sure callee healthy
raw docstring

unavailable!clj/s

(unavailable! message)
(unavailable! message data)
(unavailable! message data cause-ex)

make sure callee healthy, throwing

make sure callee healthy, throwing
raw docstring

unavailable?clj/s

(unavailable? x)

unsupportedclj/s

(unsupported message)
(unsupported message data)
(unsupported message data cause-ex)

fix caller verb

fix caller verb
raw docstring

unsupported!clj/s

(unsupported! message)
(unsupported! message data)
(unsupported! message data cause-ex)

fix caller verb, throwing

fix caller verb, throwing
raw docstring

unsupported?clj/s

(unsupported? x)

with-exclj/s

(with-ex anomaly ex)

Associates ex with the anomaly.

Associates ex with the anomaly.
raw docstring

with-public-ksclj/s

(with-public-ks anom-data ks)

Adds ks to the set of public keys for anom-data.

Adds `ks` to the set of public keys for `anom-data`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close