Skip to main content
Version: 4.2.0

Error Codes

The SDK returns errors as BidMachineError. Two things are public:

  • Code — the numeric category (int).
  • Message — a human-readable description (string).

Switch on Code against the numbers below to handle specific failures.

note

Named code constants are not part of the public API — only the raw Code number and Message string are exposed. Switch on the number.

Code Reference

The internal case names are shown for orientation only — they are not callable from app code.

CodeInternal nameDescription
100connectionCan't connect to server.
101badContentResponse content is malformed or cannot be parsed.
102timeoutTimeout reached.
103noFillNo fill.
104adNotReadyAd is not ready to be shown.
105alreadyLoadingA load is already in progress.
106destroyedAd was destroyed.
107expiredAd was expired.
108internalUnknown internal error.
109serverServer failed to fulfill an apparently valid request.
110badRequestRequest contains bad syntax or cannot be fulfilled.
200headerBiddingAdapter / header-bidding network error.

Handling Errors

ad.LoadFailed += (sender, e) =>
{
switch (e.Error.Code)
{
case 103: Debug.Log("No fill"); break;
case 102: Debug.Log("Timed out"); break;
default: Debug.LogError($"Load failed ({e.Error.Code}): {e.Error.Message}"); break;
}
};
note

The plugin does not expose a public log formatter. Read Error.Message directly.