CubeCom Pro Docs
API reference

Errors & status codes

Transport error taxonomy, GraphQL error payloads, and status codes.

CubeCom Pro distinguishes between Transport/Request Errors and Domain Incompatibilities.

Error taxonomy

CategoryHTTP StatusFormatExample Cause
Authentication401 UnauthorizedJSON / GraphQLMissing or invalid Bearer token
Validation400 Bad RequestGraphQL ErrorsMalformed JSON in selectionsJson, unknown field
Server Error500 Internal ErrorJSONDatabase or infrastructure failure
Domain Incompatibility200 OKvalid: falseSelection violates authoring constraints

Handling domain violations vs HTTP errors

const res = await fetch('/api/graphql', { ... });

if (!res.ok) {
  // HTTP Transport Error
  throw new Error(`HTTP Error ${res.status}`);
}

const data = await res.json();
if (data.errors) {
  // GraphQL Protocol Error
  throw new Error(data.errors[0].message);
}

const resolved = data.data.resolveConfiguration;
if (!resolved.valid) {
  // Domain Incompatibility - Valid 200 response with constraint violations
  console.warn("Invalid Selection:", resolved.violations);
}

On this page