Liking cljdoc? Tell your friends :D

rockbox.errors

Typed exceptions for the Rockbox SDK.

All errors are clojure.lang.ExceptionInfo instances carrying a :type key in their ex-data, so they can be discriminated with ex-data / (:type ...) in a single catch ExceptionInfo block.

(try
  (rb/query client "...")
  (catch clojure.lang.ExceptionInfo e
    (case (:type (ex-data e))
      :rockbox/network (handle-offline e)
      :rockbox/graphql (handle-server-error e)
      (throw e))))
Typed exceptions for the Rockbox SDK.

All errors are `clojure.lang.ExceptionInfo` instances carrying a `:type`
key in their ex-data, so they can be discriminated with `ex-data` /
`(:type ...)` in a single `catch ExceptionInfo` block.

    (try
      (rb/query client "...")
      (catch clojure.lang.ExceptionInfo e
        (case (:type (ex-data e))
          :rockbox/network (handle-offline e)
          :rockbox/graphql (handle-server-error e)
          (throw e))))
raw docstring

config-errorclj

(config-error msg)

Throwable: client was constructed with bad/missing config.

Throwable: client was constructed with bad/missing config.
sourceraw docstring

graphql-errorclj

(graphql-error errors)

Throwable: server returned {errors: [...]} in the response body. errors is the raw vector from the server (kebabized maps).

Throwable: server returned `{errors: [...]}` in the response body.
`errors` is the raw vector from the server (kebabized maps).
sourceraw docstring

graphql-error?clj

(graphql-error? e)

True if e is a Rockbox GraphQL error.

True if `e` is a Rockbox GraphQL error.
sourceraw docstring

network-errorclj

(network-error msg)
(network-error msg cause)

Throwable: rockboxd is unreachable, or HTTP returned a non-2xx status.

Throwable: rockboxd is unreachable, or HTTP returned a non-2xx status.
sourceraw docstring

network-error?clj

(network-error? e)

True if e is a Rockbox network error.

True if `e` is a Rockbox network error.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close