Page tree

PubMatic Android SDK provides a PubMaticSDK class you can use to debug your ads from PubMatic or to get more information about the ad flow. Enable these features by setting an appropriate log level using the setLogLevel(<PMLogLevel>) method from PubMaticSDK.

SDK Log Levels

Here is how you can set a log level for PubMaticSDK

Setting SDK Log Level
//Set log level using static method of PubMaticSDK

The LogLevel values are:

  • None
  • Verbose
  • Debug
  • Info
  • Warn
  • Error—(Default)
  • Assert

SDK Error Codes

PubMatic SDK sends a callback on ad load failure in multiple cases. The failure callback method provides a PMError object that describes the reason for failure. PMError has both an error-code and an error-message. See the table below for details and descriptions of possible error codes.

Sr. No.Error typeError CodeDescription of error
1INVALID_REQUEST1001Invalid request. May be missing mandatory parameter in request.
2NO_ADS_AVAILABLE1002No ads to show
3NETWORK_ERROR1003There was an error loading data from the network.
4SERVER_ERROR1004The ad server experienced a failure processing the request.
5OS_VERSION_TOO_LOW1005The current device’s OS is below the minimum required version.
6TIMEOUT_ERROR1006Ad request timed out
7INTERSTITIAL_ALREADY_USED1007Will not send request because the interstitial object has already been used.
8INTERNAL_ERROR1008Internal error
9INVALID_RESPONSE1009Invalid ad response
10REQUEST_CANCELLED  1013  Ad request gets cancelled
11 RENDER_ERROR1014   Issue in rendering creative

⇧ Top