//SCHEMADocs
Console
Reference

Errors

GraphQL reports errors in the response body, next to whatever data could still be returned. Check the errors array on every response.

The shape of an error#

A request that reached GraphQL is answered with HTTP 200, whether or not it succeeded. Errors are listed in errors; each names the field that failed in path.

Here a key with catalog_read but not media_read asks for a track list with download URLs:

{
  "data": {
    "release": {
      "title": "Paper Radio",
      "resources": [
        { "title": "Signal Fire", "url": null },
        { "title": "Paper Radio", "url": null }
      ]
    }
  },
  "errors": [
    {
      "message": "credential lacks the MediaRead scope",
      "locations": [{ "line": 5, "column": 7 }],
      "path": ["release", "resources", 0, "url"]
    },
    {
      "message": "credential lacks the MediaRead scope",
      "locations": [{ "line": 5, "column": 7 }],
      "path": ["release", "resources", 1, "url"]
    }
  ]
}

The titles resolved; each url did not. This is ordinary GraphQL behavior: one failing field does not void the request. When a failing field is non-nullable, the null travels up to the nearest nullable parent — for a root field, that can make data itself null.

FieldMeaning
messageWhat went wrong, for a developer. Stable enough to log, not to parse.
pathThe field that failed, from the root.
locationsLine and column in your query.
extensions.codePresent on some errors — see below. Switch on this when it exists.

Errors before execution#

If the query cannot be run at all, data is null and nothing executed.

CauseExample message
Syntax errorA parser message with the line and column
Unknown field or argumentUnknown field "titel" on type "Release".
Wrong argument typeInvalid value for argument …
Too deepQuery is nested too deep. (limit 12)
Too complexQuery is too complex. (limit 500 fields)

Validate queries against schema.graphql at build time and you will not meet these in production.

Authentication errors#

extensions.codeMessageMeaning
UNAUTHENTICATEDnot authenticated: present a bearer token in the Authorization headerNo credential was sent.
UNAUTHENTICATEDinvalid or expired credentialA credential was sent and rejected. The reason is deliberately not given.

Authorization errors#

credential lacks the <Scope> scope — the credential is valid but lacks a scope this field needs. The scope is named in the style of Viewer.scopes (CatalogRead); its wire spelling is catalog_read. See what each operation requires.

Not found is not an error#

Asking for something that does not exist, or that is not in your catalog, usually returns null or false rather than an error — and the two cases are indistinguishable on purpose, so that an API key cannot probe for other customers' data.

OperationNot found returns
release, draftReleasenull
removeResource, discardBlockedRelease, removeOrgMemberfalse
deliveryAccountKeys[]
updateReleaseerror no such release in this catalog
requestUpload, completeUploaderror no resource <id> in this catalog

Validation problems are data#

publishRelease does not use errors for "this release is not ready yet". It returns published: false and a list of every problem, so you can show them all at once:

{
  "data": {
    "publishRelease": {
      "published": false,
      "problems": [
        "a UPC or GRid is required to publish",
        "no cover art"
      ]
    }
  }
}

Common errors#

MessageFromWhat to do
those bytes are not in the store: complete the upload first, or request a new URL if it expiredcompleteUpload, deliverMessage, deliverFileThe PUT did not finish or its URL expired. Request a new upload and retry.
<n> bytes exceeds the 5368709120-byte single-upload limit; deliver files this large over SFTPrequestUpload, requestDeliveryUploadUse SFTP for files over 5 GiB.
byteSize must be positiverequestUpload, requestDeliveryUploadSend the real file size.
ERN parse error: … / ERN map error: …deliverMessageThe XML is not a DDEX ERN //SCHEMA can read. The message says where.
unknown scope "…"mintApiKeyUse the wire spelling, e.g. catalog_read.
cannot grant "…": this credential does not hold it, …mintApiKeyA key cannot mint a more powerful key.
only an owner can make somebody else an owneraddOrgMember, setOrgMemberRoleAsk an owner.
you cannot change your own role — ask another owner or admin to do itsetOrgMemberRoleAs it says. The same applies to removing yourself.
… is a private, loopback or reserved address, which webhooks cannot be sent tocreateWebhookEndpoint, updateWebhookEndpointUse a public https:// URL.
webhook URLs must use https:// / … the default HTTPS port (443)createWebhookEndpoint, updateWebhookEndpointServe your receiver over HTTPS on port 443.
unknown event type "…"; see webhookEventTypescreateWebhookEndpoint, updateWebhookEndpointUse a type from webhookEventTypes.
an organization can have at most 10 webhook endpointscreateWebhookEndpointDelete one you no longer use.
no owner of this organization has an email address we can send to, …createWebhookEndpoint, updateWebhookEndpointEvery owner is told about a new webhook destination; give an owner a working address.
the endpoint is disabled; enable it firstsendTestWebhook, redeliverWebhookTurn it back on with updateWebhookEndpoint.
media is not available: this deployment has no object store configuredResource.url, Message.sourceUrlA server-side configuration problem; contact support.
cannot presign: ttl must be between 1s and 3600s, got 0sResource.url, Message.sourceUrlPass a positive ttlSeconds, or omit it.
code ENCODING_PENDING, ENCODING_NOT_REQUESTED, ENCODING_NOT_AVAILABLE, ENCODING_FAILED, UNKNOWN_ENCODINGResource.url, requestEncodingSee Encodings and media URLs.
code LOSSLESS_NOT_ENABLEDResource.url, requestEncodingYour organization does not have lossless media — it comes with enterprise, and with other plans by arrangement. Pull a lossy encoding such as aac-256.
lossless media is not enabled for this organizationmintApiKeymedia_lossless can only be put on a key in an organization with lossless media.
code LOSSY_MASTER: MP3 is not accepted as a master: …deliverFile, completeUploadMasters must be lossless — WAV, AIFF, FLAC or ALAC — decided from the file's header. A refused delivery is listed by deliveryRejections.

Retrying#

Most mutations are safe to retry after a network failure: publishing, delivering a message, delivering a file, completing an upload, revoking a key and removing a resource all converge on the same result when repeated. Minting a key, issuing a delivery account, adding a resource and creating a party without a DPID are not — retrying them creates a second one.