google.ima. AdError
AdError surfaces information to the user about whether a failure occurred during ad loading or playing. The errorType accessor provides information about whether the error occurred during ad loading or ad playing.
- Extends
- Error
Enumerations
ErrorCode
number
The possible error codes raised while loading or playing ads. The ErrorCodes are numeric values and can be in one of the following ranges:
- Standard VAST 3 compliant ad error codes use blocks below 1000.
- SDK specific error codes: 1000-1099 for high level generic errors 1100-1199 for low level generic errors 1200-1299 for video playback specific errors \
Value |
|
---|---|
VAST_MALFORMED_RESPONSE |
The ad response was not recognized as a valid VAST ad. VAST error code 100 |
VAST_SCHEMA_VALIDATION_ERROR |
VAST schema validation error. VAST error code 101 |
VAST_UNSUPPORTED_VERSION |
The ad response contained an unsupported VAST version. VAST error code 102 |
VAST_TRAFFICKING_ERROR |
Trafficking error. Video player received an ad type that it was not expecting and/or cannot display. VAST error code 200 |
VAST_UNEXPECTED_LINEARITY |
Ad linearity is different from what the video player is expecting. VAST error code 201 |
VAST_UNEXPECTED_DURATION_ERROR |
VAST duration is different from the actual media file duration. VAST error code 202 |
VAST_WRAPPER_ERROR |
General VAST wrapper error. VAST error code 300 |
VAST_LOAD_TIMEOUT |
The VAST URI provided, or a VAST URI provided in a subsequent wrapper element, was either unavailable or reached a timeout, as defined by the video player. The timeout is 5 seconds for initial VAST requests and each subsequent wrapper. VAST error code 301 |
VAST_TOO_MANY_REDIRECTS |
The maximum number of VAST wrapper redirects has been reached. VAST error code 302 |
VAST_NO_ADS_AFTER_WRAPPER |
No Ads VAST response after one or more wrappers. VAST error code 303 |
VIDEO_PLAY_ERROR |
There was an error playing the video ad. VAST error code 400 |
VAST_MEDIA_LOAD_TIMEOUT |
Failed to load media assets from a VAST response. The default timeout for media loading is 8 seconds. VAST error code 402 |
VAST_LINEAR_ASSET_MISMATCH |
Assets were found in the VAST ad response for linear ad, but none of them matched the video player's capabilities. VAST error code 403 |
VAST_PROBLEM_DISPLAYING_MEDIA_FILE |
Problem displaying MediaFile. Currently used if video playback is stopped due to poor playback quality. VAST error code 405 |
OVERLAY_AD_PLAYING_FAILED |
An overlay ad failed to render. VAST error code 500 |
NONLINEAR_DIMENSIONS_ERROR |
Unable to display NonLinear ad because creative dimensions do not align with creative display area (for example, creative dimension too large). VAST error code 501 |
OVERLAY_AD_LOADING_FAILED |
An overlay ad failed to load. VAST error code 502 |
VAST_NONLINEAR_ASSET_MISMATCH |
Assets were found in the VAST ad response for nonlinear ad, but none of them matched the video player's capabilities. VAST error code 503 |
COMPANION_REQUIRED_ERROR |
Unable to display one or more required companions. The main ad is discarded since the required companions could not be displayed. VAST error code 602 |
COMPANION_AD_LOADING_FAILED |
A companion ad failed to load or render. VAST error code 603 |
UNKNOWN_ERROR |
An unexpected error occurred and the cause is not known. Refer to the inner error for more information. VAST error code 900 |
VPAID_ERROR |
A VPAID error occurred. Refer to the inner error for more information. VAST error code 901 |
FAILED_TO_REQUEST_ADS |
There was a problem requesting ads from the server. IMA Error code 1005 |
VAST_ASSET_NOT_FOUND |
No assets were found in the VAST ad response. IMA Error code 1007 |
VAST_EMPTY_RESPONSE |
A VAST response containing a single |
UNKNOWN_AD_RESPONSE |
The ad response was not understood and cannot be parsed. IMA Error code 1010 |
ADS_REQUEST_NETWORK_ERROR |
There was a problem requesting ads from the server. IMA Error code 1012 |
INVALID_AD_TAG |
The ad tag url specified was invalid. It needs to be properly encoded. IMA Error code 1013 |
PROTECTED_AUDIENCE_API_ERROR |
A Protected Audience API error occurred. Refer to the inner error for more information. IMA Error code 1014 |
STREAM_INITIALIZATION_FAILED |
There was an error with stream initialization during server side ad insertion. IMA Error code 1020 |
ASSET_FALLBACK_FAILED |
There was an error with asset fallback. IMA Error code 1021 |
UNSUPPORTED_URL |
The URL is invalid or is not supported by the current browser. IMA Error code 1022 |
INVALID_ARGUMENTS |
Invalid arguments were provided to SDK methods. IMA Error code 1101 |
AUTOPLAY_DISALLOWED |
The browser prevented playback initiated without user interaction. IMA Error code 1205 |
CONSENT_MANAGEMENT_PROVIDER_NOT_READY |
A Consent Management Provider was detected on the page, and it has indicated that consent is not yet known. IMA Error code 1300 |
Type
string
The possible error types for ad loading and playing. \
Value |
|
---|---|
AD_LOAD |
Indicates that the error was encountered when the ad was being loaded. Possible causes: there was no response from the ad server, malformed ad response was returned, or ad request parameters failed to pass validation. |
AD_PLAY |
Indicates that the error was encountered after the ad loaded, during ad play. Possible causes: ad assets could not be loaded, and more. |
Properties
ErrorCode
number
The possible error codes raised while loading or playing ads. The ErrorCodes are numeric values and can be in one of the following ranges:
- Standard VAST 3 compliant ad error codes use blocks below 1000.
- SDK specific error codes: 1000-1099 for high level generic errors 1100-1199 for low level generic errors 1200-1299 for video playback specific errors \
Value |
|
---|---|
VAST_MALFORMED_RESPONSE |
The ad response was not recognized as a valid VAST ad. VAST error code 100 |
VAST_SCHEMA_VALIDATION_ERROR |
VAST schema validation error. VAST error code 101 |
VAST_UNSUPPORTED_VERSION |
The ad response contained an unsupported VAST version. VAST error code 102 |
VAST_TRAFFICKING_ERROR |
Trafficking error. Video player received an ad type that it was not expecting and/or cannot display. VAST error code 200 |
VAST_UNEXPECTED_LINEARITY |
Ad linearity is different from what the video player is expecting. VAST error code 201 |
VAST_UNEXPECTED_DURATION_ERROR |
VAST duration is different from the actual media file duration. VAST error code 202 |
VAST_WRAPPER_ERROR |
General VAST wrapper error. VAST error code 300 |
VAST_LOAD_TIMEOUT |
The VAST URI provided, or a VAST URI provided in a subsequent wrapper element, was either unavailable or reached a timeout, as defined by the video player. The timeout is 5 seconds for initial VAST requests and each subsequent wrapper. VAST error code 301 |
VAST_TOO_MANY_REDIRECTS |
The maximum number of VAST wrapper redirects has been reached. VAST error code 302 |
VAST_NO_ADS_AFTER_WRAPPER |
No Ads VAST response after one or more wrappers. VAST error code 303 |
VIDEO_PLAY_ERROR |
There was an error playing the video ad. VAST error code 400 |
VAST_MEDIA_LOAD_TIMEOUT |
Failed to load media assets from a VAST response. The default timeout for media loading is 8 seconds. VAST error code 402 |
VAST_LINEAR_ASSET_MISMATCH |
Assets were found in the VAST ad response for linear ad, but none of them matched the video player's capabilities. VAST error code 403 |
VAST_PROBLEM_DISPLAYING_MEDIA_FILE |
Problem displaying MediaFile. Currently used if video playback is stopped due to poor playback quality. VAST error code 405 |
OVERLAY_AD_PLAYING_FAILED |
An overlay ad failed to render. VAST error code 500 |
NONLINEAR_DIMENSIONS_ERROR |
Unable to display NonLinear ad because creative dimensions do not align with creative display area (for example, creative dimension too large). VAST error code 501 |
OVERLAY_AD_LOADING_FAILED |
An overlay ad failed to load. VAST error code 502 |
VAST_NONLINEAR_ASSET_MISMATCH |
Assets were found in the VAST ad response for nonlinear ad, but none of them matched the video player's capabilities. VAST error code 503 |
COMPANION_REQUIRED_ERROR |
Unable to display one or more required companions. The main ad is discarded since the required companions could not be displayed. VAST error code 602 |
COMPANION_AD_LOADING_FAILED |
A companion ad failed to load or render. VAST error code 603 |
UNKNOWN_ERROR |
An unexpected error occurred and the cause is not known. Refer to the inner error for more information. VAST error code 900 |
VPAID_ERROR |
A VPAID error occurred. Refer to the inner error for more information. VAST error code 901 |
FAILED_TO_REQUEST_ADS |
There was a problem requesting ads from the server. IMA Error code 1005 |
VAST_ASSET_NOT_FOUND |
No assets were found in the VAST ad response. IMA Error code 1007 |
VAST_EMPTY_RESPONSE |
A VAST response containing a single |
UNKNOWN_AD_RESPONSE |
The ad response was not understood and cannot be parsed. IMA Error code 1010 |
ADS_REQUEST_NETWORK_ERROR |
There was a problem requesting ads from the server. IMA Error code 1012 |
INVALID_AD_TAG |
The ad tag url specified was invalid. It needs to be properly encoded. IMA Error code 1013 |
PROTECTED_AUDIENCE_API_ERROR |
A Protected Audience API error occurred. Refer to the inner error for more information. IMA Error code 1014 |
STREAM_INITIALIZATION_FAILED |
There was an error with stream initialization during server side ad insertion. IMA Error code 1020 |
ASSET_FALLBACK_FAILED |
There was an error with asset fallback. IMA Error code 1021 |
UNSUPPORTED_URL |
The URL is invalid or is not supported by the current browser. IMA Error code 1022 |
INVALID_ARGUMENTS |
Invalid arguments were provided to SDK methods. IMA Error code 1101 |
AUTOPLAY_DISALLOWED |
The browser prevented playback initiated without user interaction. IMA Error code 1205 |
CONSENT_MANAGEMENT_PROVIDER_NOT_READY |
A Consent Management Provider was detected on the page, and it has indicated that consent is not yet known. IMA Error code 1300 |
Type
string
The possible error types for ad loading and playing. \
Value |
|
---|---|
AD_LOAD |
Indicates that the error was encountered when the ad was being loaded. Possible causes: there was no response from the ad server, malformed ad response was returned, or ad request parameters failed to pass validation. |
AD_PLAY |
Indicates that the error was encountered after the ad loaded, during ad play. Possible causes: ad assets could not be loaded, and more. |
Methods
getErrorCode
getErrorCode() returns number
- Returns
-
number
The error code, as defined in AdError.ErrorCode.
getInnerError
getInnerError() returns (null or Error)
Returns the Error that caused this one.
- Returns
-
(null or non-null Error)
Inner error that occurred during processing, or null if this information is unavailable. This error may either be a native error or an AdError, a subclass of a native error. This may return null if the error that caused this one is not available.
getMessage
getMessage() returns string
- Returns
-
string
The message for this error.
getType
getType() returns string
- Returns
-
string
The type of this error, as defined in AdError.Type.
getVastErrorCode
getVastErrorCode() returns number
- Returns
-
number
If VAST error code is available, returns it, otherwise returns AdError.ErrorCode.UNKNOWN_ERROR.
toString
toString() returns string
- Returns
-
string