Skip to content
:docs

Troubleshooting

An error code appears

If a BuzzvilSDK method call fails, Error is passed to the onFailure callback. Use the error code table below to identify the cause and resolve the problem.

Error codeCauseResolution
serverErrorAn error occurred on the Buzzvil server.Send the error code to your Buzzvil representative.
clientErrorThe request did not meet the requirements.
(For example, an ad was requested before the user logged in.)
Check that the request arguments contain valid values.
connectionTimeoutThe network request timed out.Check the network connection.
emptyResponseThe network response is empty.
(For example, an ad request succeeded but returned zero ads.)
Send the error code to your Buzzvil representative.
waitingForResponseThis error can occur if you request another preload while a preload request is already being processed for BenefitHub. Ad allocation still proceeds normally when this error occurs.Check that you have not requested a duplicate preload.
agePolicyThe user is younger than the minimum age allowed to receive ads under the platform policy.Set the age to 15 or older during login.
privacyPolicyNotGrantedThe user has not agreed to the privacy policy.Check that the user agreed to the privacy policy before requesting ads.
unknownAn unidentified error occurred.Check for errors in the SDK integration and app build.

The following example handles errors when requesting native ads.

Swift
let native = BuzzNative(unitId: "YOUR_NATIVE_UNIT_ID")

native.load(
  onSuccess: { nativeAd in
    // 할당된 광고가 있으면 호출됩니다.
  },
  onFailure: { error in
    guard let error = error as? BuzzError else {
      // BuzzErrorDomain에 속하지 않는 오류를 처리합니다.
      return
    }

    switch error {
      case .serverError:
        print("server error")
      case .clientError:
        print("client error")
      case .connectionTimeout:
        print("connection timeout")
      case .emptyResponse:
        print("empty response")
      case .waitingForResponse:
        print("waiting for response")
      case .agePolicy:
        print("age policy")
      case .privacyPolicyNotGranted:
        print("privacy policy not granted")
      case .unknown:
        print("unknown error")
      @unknown default:
        break
    }
  }
)