Every error response uses the envelope described below. Code against it as the default. CI HUB-originated errors (source: "cihub") return it today. DAM-originated errors (source: "integration") are still being migrated, so some still arrive in an older form or with envelope fields unset. Read the envelope defensively until that work completes. The source field distinguishes errors originating in CI HUB from errors originating in a DAM provider.
Structured or string context. Useful for logs, not for end users.
provider
only when source is integration
DAM that produced the error (bynder, aem, etc.)
The HTTP status in the response line equals error.status.
The presence guarantees above hold for the structured envelope, which every cihub error and every migrated integration error returns. A DAM error still on the legacy path can instead arrive as { "message": "Error", "details": "..." } with no error object, so check that error exists before reading error.code.
cihub errors use standard HTTP status conventions. integration errors forward the DAM's HTTP status when the integration classifies it as a known case; otherwise a default status applies.
Partner JWT is malformed; signed with the wrong algorithm; missing required header or claim fields; signature verification failed; iat is more than 30s in the future; or iat is older than maxTokenAge (more than maxTokenAge seconds in the past).
Mint a fresh JWT. Verify alg: RS256, that kid matches a key in the JWKS, and that all required claims are present. Sign a new token per exchange so iat stays recent.
cihub-sdk-token-expired
cihub
Partner JWT past exp.
Mint a new JWT with a fresh iat and exp.
cihub-access-token-missing
cihub
Authorization header absent on a post-exchange API call.
Send Authorization: Bearer <CI HUB access_token>.
cihub-access-token-invalid
cihub
CI HUB access token is present but invalid or expired.
Mint a new access token using the refresh token. If refresh fails, run the token exchange again.
cihub-refresh-token-invalid
cihub
On GET /auth/refreshToken, the provider-authorization token is not a CI HUB refresh token (for example an access token sent in its place), or its sub does not match the access token. A signature failure, malformed token, or expired refresh token returns provider-access-token-invalid (403) instead.
Send the refresh token returned by exchange in provider-authorization. If it has expired, run the token exchange again.
integration-auth-failed
integration
The DAM provider rejected the forwarded authentication, for example a token revoked at the DAM or a failed token refresh on the DAM side. provider names the integration.
Refresh the DAM token where supported, otherwise restart the DAM login flow.
Verify the issuer string matches the registered value exactly, including trailing slash.
cihub-sdk-audience-invalid
cihub
The aud claim does not match the registered audience.
Set aud to the registered value (default https://api.ci-hub.com).
cihub-access-denied
cihub
A whitelist or role check rejected the request.
The details field describes the rejected check. The fix is typically operational (account-level configuration).
provider-access-token-missing
cihub
A content call requires a DAM connection token (provider-authorization header) but none was sent.
Complete the DAM login flow for this provider and send the resulting token in provider-authorization.
provider-access-token-invalid
cihub
The provider-authorization token failed verification, was malformed, or has expired. Covers both a DAM connection token on content calls and a CI HUB refresh token whose signature or expiry failed on GET /auth/refreshToken.
For a DAM token, re-run the DAM login flow. For a CI HUB refresh token, run the token exchange again.
integration-forbidden
integration
DAM provider rejected the call with a permission error.
Surface the message to the end user. Permission decisions are governed by the DAM.
details is optional. When present on an integration error, it carries the upstream message verbatim. Use error.message for end-user strings. Reserve error.details for logs and support tickets.