Package-level declarations

Types

Link copied to clipboard
class QueryBusyException(val store: String, val maxConcurrent: Int) : QueryExecutionException

A query its store's QueryBulkhead did not admit: the store already runs maxConcurrent queries, so this one was not run. QueryErrors.BUSY (HTTP 429, with Retry-After); the same query may pass later. The message names no store: its name is the server's configuration. Its cause is a StorageBusyException naming the store, which a subscription handler that ran the query retries as backpressure.

Link copied to clipboard

A query of a dataset that is served but cannot be queried now (me.ahoo.wow.query.dataset.QueryDataset.unavailable, 7.2b-2): QueryErrors.DATASET_UNAVAILABLE (HTTP 409). The message names the dataset and the reason, fixed words such as needs revision; what made it so stays with whoever marked it. A type's snapshots are refused so too while their table is removed under its record (snapshotsRemoved), the reason naming the store.

Link copied to clipboard
interface QueryError

A query error as the edge answers it: its framework errorCode (a FrameworkCodes.QUERY_* code, or the code a read authorizer refused with), its message and the violations of the request, each the rule a rejected request broke and where, as a problem's violations carry them.

Link copied to clipboard

The framework error codes of the query side, as the edge answers them:

Link copied to clipboard

A query the caller got right that the server failed to run: a cursor position that does not encode, a stored record or backend row that breaks integrity (a non-finite number), a storage that failed. QueryErrors.FAILED (HTTP 500), never a me.ahoo.wow.query.schema.QueryViolation: the caller cannot fix it by changing the request.

Link copied to clipboard

A query whose computed value went beyond a double's range on its backend, an underflow to zero included: QueryErrors.OUT_OF_RANGE (HTTP 400). PostgreSQL fails the statement for it, where the other backends answer the value as none (an underflow as 0), as AggregationExpression's finite doubles say; running it again fails the same way. cause is the store's own error, kept server-side.

Link copied to clipboard
class QueryRequestException(val message: String, val code: String, name: String = BODY, cause: Throwable? = null, val violation: QueryViolation? = null, problem: String? = null) : IllegalArgumentException, QueryError

A query request the client got wrong: IllegalArgument with the human message and one violation naming where (name, a JSON path or body) and which rule (code, stable and machine-readable). violation is the catalog entry it renders, when the rule is one (QueryViolation.Kind.REQUEST): the request is then invalid. Decoding errors state only a code: the request is malformed.

Link copied to clipboard

A query the storage could not run because it was unreachable or did not answer in time, a backend's me.ahoo.wow.spi.StorageUnavailableException as cause: QueryErrors.STORAGE_UNAVAILABLE (HTTP 503). The same query may pass once the storage is back.

Link copied to clipboard

A query that ran out of the execution time its budget gives it: QueryErrors.TIMEOUT (HTTP 504). The backend received the same timeout to bound the statement natively (statement_timeout, maxTimeMS); the core enforces it as well, so a backend that ignores it still fails here.