Error messages returned by the Media API include a numerical error code that classifies errors by type:
| code range | error type |
|---|---|
| 100–199 | system errors |
| 200–299 | low-level user errors |
| 300–399 | high-level (business logic) user errors |
The following error messages can be returned by the Media API:
| code | name | message | cause |
|---|---|---|---|
| 100 | UnknownServerError | an unknown error occurred while processing your request | An unspecified and unexpected error |
| 101 | ServiceDeployingError | The write API is currently unavailable due to a scheduled upgrade. Please check http://studio.brightcove.com/ for updates. | The Brightcove Write API is currently down for a scheduled deployment. |
| 103 | CallTimeoutError | The request you made is taking longer than expected to return. If requesting a large amount of data please try again with a smaller page_size. | Media API calls can time out before they complete if you are trying to get too much data at once. The page_size argument enables returning data in more manageable chunks. |
| 200 | EnctypeError | wrong enctype; write methods require a multipart/form-data POST | Calling a write method with a plain old POST |
| 201 | GetRequiredError | methods that retrieve data must be called using GET requests | Calling POST instead of GET on the Read API |
| 202 | PostRequiredError | methods that change data must be called using POST requests | Calling GET instead of POST on the Write API |
| 203 | MissingQueryStringError | no query string provided | A missing query string in GET |
| 204 | MissingBodyError | POST methods require valid JSON-RPC in the POST body, with "method" and "params" properties | A missing parameter section in POST |
| 205 | MalformedParametersError | unable to parse JSON-RPC parameters; they may be malformed or incorrect | Malformed JSON in request |
| 206 | InvalidMethodError | invalid method name | Invalid method name |
| 207 | FilestreamRequiredError | upload requires a multipart/form-data POST with a valid filestream | Missing file stream |
| 208 | MissingFileNameError | file for upload must have a filename | Missing file name |
| 209 | UnwantedFilestreamError | non-upload methods should not include a filestream | A filestream was provided for a non-upload method. |
| 210 | InvalidTokenError | invalid token | The token used in the call is invalid. |
| 211 | MissingJSONError | Could not find JSON-RPC. | We got a null string for either the json parameter (for a non-multipart post) or the first part of a multipart post. |
| 301 | InvalidParametersError | parameters are the wrong type or number for this method | Invoking the method threw an IllegalArgumentException |
| 302 | DeleteFailedError | <message with reason for failure filled in by throwing method> | Attempt to delete a business object failed. For example, attempts to delete a video that's in a manual playlist will fail. |
| 303 | RequiredParameterError | required parameter <> was missing (<> to be filled in by throwing method) | A required parameter was not set. |
| 304 | IllegalValueError |
|
|
| 305 | IncompatibleValueError |
|
|
| 306 | FileFormatError | The provided file was not in the expected format | The file provided to create_video was not in a supported file format. |
| 307 | ObjectNotFoundError | The object specified by the given parameters could not be found. | The object with the specified id could not be found. |
| 308 | NonmatchingChecksumError | The provided file's MD5 digest did not match the checksum provided. | We checked an uploaded file's hash and it didn't match the expected checksum. |
| 309 | RemoteAssetsDisabledError | This account is not approved to use remote assets. | You attempted to create or update a remote asset, but your account is not enabled for this feature. |
| 310 | InvalidCountryCodeError | The following country codes are not supported for geo-restriction:
|
You used an invalid country code for geo-restriction. |
| 311 | GeoRestrictionDisabledError | This account is not approved to use geo-restriction. | You attempted to set geo-restriction properties for a video, but your account is not enabled for this feature. |
| 312 | ParameterConflictError | Two or more parameters passed to a method have incompatible values. <specific conflict if known> | Two or more parameter values passed to an API method have incompatible values. |
| 313 | MediaSharingDisabledError | This account is not approved to use media sharing. | You attempted to share a video, but your account is not enabled to use media sharing. |
| 314 | MediaDeliveryTypeDisabledError | This account is not enabled to the specified media delivery type (ie: http) | You specified HTTP for the media delivery type of a video, but your account is not enabled for it. |