When the “Automatic Interceptor” is enabled, the SDK will generate an error object when the URL request was blocked or when the challenge was solved/cancelled.You should check the error if it’s one of the SDK’s errors.
You can check the error by using those APIs:
PerimeterX/isRequestBlockedError(error:)
- returns true
when the request was blocked.PerimeterX/isChallengeSolvedError(error:)
- returns true
when the request was blocked and the user solved the challenge.PerimeterX/isChallengeCancelledError(error:)
- returns true
when the request was blocked and the user cancelled the challenge.Here is an example on how to check the error:
If you are using Alamofire, you should pass the AFError.underlyingError object to those functions
When the “Automatic Interceptor” is enabled, the SDK will handle the block response from your server. The SDK will return the following errors to your URL request’s handler:
When the SDK receives the block response from the server it performs the following actions:
block view controller
in the app, over your other controllers.block view controller
the SDK presents a web view which loads the challenge that must be solved by the user (or the bot).block view controller
and allow the user to continue working in your app.