class

RiduError

A structured SDK failure with an error code, HTTP status, request ID, validation issues, and details.

Example

ts
try {
  await cms.update("posts", id, input, { revision });
} catch (error) {
  if (error instanceof RiduError && error.code === "conflict") reload();
}

Properties

PropertyTypeDescription
codeErrorCodeThe code value.
statusnumberThe status value.
requestIdstring | undefinedThe requestId value.
issuesreadonly ValidationIssue[]The issues value.
detailsunknownThe details value.
namestringThe name value.
messagestringThe message value.
stackstringThe stack value.
causeunknownThe cause of the error.

How it works

Non-envelope failures receive a stable fallback code. Validation issues retain their paths.

Full signature