ErrorCode enum

This enum contains various error codes that the SDK can return when a MAX ad fails to load or display.

Inheritance
Available extensions

Values

unspecified → const ErrorCode

This error code represents an error that could not be categorized into one of the other defined errors. See the message field in the error object for more details.

const ErrorCode(-1)
noFill → const ErrorCode

This error code indicates that MAX returned no eligible ads from any mediated networks for this app/device.

const ErrorCode(204)
adLoadFailed → const ErrorCode

This error code indicates that MAX returned eligible ads from mediated networks, but all ads failed to load. See the adLoadFailureInfo field in the error object for more details.

const ErrorCode(-5001)
adDisplayFailed → const ErrorCode

This error code represents an error that was encountered when showing an ad.

const ErrorCode(-4205)
networkError → const ErrorCode

This error code indicates that the ad request failed due to a generic network error. See the message field in the error object for more details.

const ErrorCode(-1000)
networkTimeout → const ErrorCode

This error code indicates that the ad request timed out due to a slow internet connection.

const ErrorCode(-1001)
noNetwork → const ErrorCode

This error code indicates that the ad request failed because the device is not connected to the internet.

const ErrorCode(-1009)
fullscreenAdAlreadyShowing → const ErrorCode

This error code indicates that you attempted to show a fullscreen ad while another fullscreen ad is still showing.

const ErrorCode(-23)
fullscreenAdNotReady → const ErrorCode

This error code indicates you are attempting to show a fullscreen ad before the one has been loaded.

const ErrorCode(-24)
fullscreenAdInvalidViewController → const ErrorCode

This error code indicates you attempted to present a fullscreen ad from an invalid view controller.

Note: iOS only.

const ErrorCode(-25)
fullscreenAdAlreadyLoading → const ErrorCode

This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is already loading.

const ErrorCode(-26)
fullscreenAdLoadWhileShowing → const ErrorCode

This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is still showing.

const ErrorCode(-27)
dontKeepActivitiesEnabled → const ErrorCode

This error code indicates that the SDK failed to display an ad because the user has the "Don't Keep Activities" developer setting enabled.

Note: Android only.

const ErrorCode(-5602)
invalidAdUnitId → const ErrorCode

This error code indicates that the SDK failed to load an ad because the publisher provided an invalid ad unit identifier.

Possible reasons for an invalid ad unit identifier:

  1. Ad unit identifier is malformed or does not exist.
  2. Ad unit is disabled.
  3. Ad unit is not associated with the current app's package name.
  4. Ad unit was created within the last 30-60 minutes.
const ErrorCode(-5603)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromValue(int value) ErrorCode
Returns the corresponding ErrorCode enum for a given integer value.

Constants

values → const List<ErrorCode>
A constant List of the values in this enum, in order of their declaration.