The single ex-info convention used by every bsdkrun.* namespace: a
plain ex-info whose ex-data carries a :bsdkrun/error kind key plus
whatever detail a caller needs to case/pattern-match on — no exception
class hierarchy, which would be un-idiomatic Clojure.
Every namespace in this SDK throws these via e.g.
(throw (errors/command-failed {...})) rather than a bare
(throw (Exception. ...)).
The single `ex-info` convention used by every `bsdkrun.*` namespace: a
plain `ex-info` whose `ex-data` carries a `:bsdkrun/error` kind key plus
whatever detail a caller needs to `case`/pattern-match on — no exception
class hierarchy, which would be un-idiomatic Clojure.
Every namespace in this SDK throws these via e.g.
`(throw (errors/command-failed {...}))` rather than a bare
`(throw (Exception. ...))`.(auth-error)(auth-error message)The daemon rejected our token — an HTTP 401, a GraphQL error whose
extensions.code is "UNAUTHENTICATED", or a websocket that closed
before connection_ack ever arrived. Mirrors web/src/lib/graphql.ts's
AuthError.
The daemon rejected our token — an HTTP 401, a GraphQL error whose `extensions.code` is `"UNAUTHENTICATED"`, or a websocket that closed before `connection_ack` ever arrived. Mirrors `web/src/lib/graphql.ts`'s `AuthError`.
(binary-not-found searched)The bsdkrun binary could not be located on the host.
searched is the ordered list of candidate paths that were probed.
The `bsdkrun` binary could not be located on the host. `searched` is the ordered list of candidate paths that were probed.
(command-failed {:keys [exit-code stdout stderr command]})A bsdkrun invocation exited non-zero.
opts is a map with :exit-code, :stdout, :stderr, :command (a
human label for the invocation) — the same shape as a bsdkrun.process
result plus :command, so it can be built straight from one.
A `bsdkrun` invocation exited non-zero. `opts` is a map with `:exit-code`, `:stdout`, `:stderr`, `:command` (a human label for the invocation) — the same shape as a `bsdkrun.process` result plus `:command`, so it can be built straight from one.
(graphql-error message)(graphql-error message code)A GraphQL request to a remote bsdkrund daemon failed — a transport
failure, a non-JSON response, or a body["errors"] entry that was not an
auth failure. Mirrors web/src/lib/graphql.ts's GraphQLError.
code is the error's extensions.code, when the daemon set one.
A GraphQL request to a remote `bsdkrund` daemon failed — a transport failure, a non-JSON response, or a `body["errors"]` entry that was not an auth failure. Mirrors `web/src/lib/graphql.ts`'s `GraphQLError`. `code` is the error's `extensions.code`, when the daemon set one.
(missing-config message)bsdkrun.client/client-from-env was called with BSDKRUN_URL unset, or
set without BSDKRUN_TOKEN — an error, not a silent unauthenticated
fallback. Mirrors daemon/src/client.rs's RemoteConfig::from_env rule.
`bsdkrun.client/client-from-env` was called with `BSDKRUN_URL` unset, or set without `BSDKRUN_TOKEN` — an error, not a silent unauthenticated fallback. Mirrors `daemon/src/client.rs`'s `RemoteConfig::from_env` rule.
(missing-option option)A required create-option key was absent (mirrors Ruby's Hash#fetch
raising when a required option like :image/:kernel/:firmware/:disk
is missing from the options map passed to bsdkrun.args/build-create-args).
A required create-option key was absent (mirrors Ruby's `Hash#fetch` raising when a required option like `:image`/`:kernel`/`:firmware`/`:disk` is missing from the options map passed to `bsdkrun.args/build-create-args`).
(sandbox-not-found id)No machine matched the given id / prefix.
No machine matched the given id / prefix.
(unknown-os os)build-create-args was called with an :os it doesn't know how to build
argv for.
`build-create-args` was called with an `:os` it doesn't know how to build argv for.
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 |