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.
| Code | Internal name | Description |
|---|---|---|
100 | connection | Can't connect to server. |
101 | badContent | Response content is malformed or cannot be parsed. |
102 | timeout | Timeout reached. |
103 | noFill | No fill. |
104 | adNotReady | Ad is not ready to be shown. |
105 | alreadyLoading | A load is already in progress. |
106 | destroyed | Ad was destroyed. |
107 | expired | Ad was expired. |
108 | internal | Unknown internal error. |
109 | server | Server failed to fulfill an apparently valid request. |
110 | badRequest | Request contains bad syntax or cannot be fulfilled. |
200 | headerBidding | Adapter / 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.