> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/sdk-lite/failure-handling/mobile/failure-handling.md). Agents can also search and read this documentation through its [MCP server](https://docs.caf.io/~gitbook/mcp).

# Failure Reasons and User Guidance

When the capture runs to the end but is not approved, the SDK returns a `Failure` event. Its `type` parameter, a `CafFailureType` enum, gives the most likely reason, so you can guide the user to pass on the next attempt.

Most failures can be solved by the user with good guidance about light, distance, position and stability.

{% hint style="info" %}
Some common situations are not failures. Camera access denied, a connection that drops, a service that is unavailable or an expired token stop the run before any capture is evaluated, so the SDK returns an error instead, with no signed response. See [Android Error Handling](https://docs.caf.io/sdk-lite/error-handling/android/error-handling.md) and [iOS Error Handling](https://docs.caf.io/sdk-lite/error-handling/ios/error-handling.md).
{% endhint %}

## The Failure Structure

{% tabs %}
{% tab title="Android" %}

```kotlin
public sealed interface LivenessLiteEvent {

    public data class Failure(
        val signedResponse: String,
        val type: CafFailureType,
        val description: String,
    ) : LivenessLiteEvent
}
```

{% endtab %}

{% tab title="iOS" %}

```swift
public protocol CafFaceLivenessLiteDelegate: AnyObject {
    // ...
    func didFinishWithFailure(type: CafFailureType, description: String?, signedResponse: String?)
}
```

{% endtab %}
{% endtabs %}

| Parameter        | Description                                                                                                                                                        |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `signedResponse` | The signed result from the server. Send it to your backend, like a success.                                                                                        |
| `type`           | The most likely reason for the failure. Use it to choose the user message.                                                                                         |
| `description`    | A message from the liveness analysis, for your logs. It may be in the device language and may not match the recommended message. Do not show it to your end users. |

{% hint style="warning" %}
Never decide the outcome on the device. Your backend validates the signed response (signature and `tokenId`) and then retrieves the final result, including `isAlive`, with the `livenessAttemptId` it carries. See [Backend Setup](https://docs.caf.io/sdk-lite/setup/backend/setup.md).
{% endhint %}

### How to Read the `type`

The liveness analysis is done by an artificial intelligence model. It evaluates the capture and assigns each failure its **most likely** reason. This classification is probabilistic: the model may return a reason that does not seem to match what happened. For example, it can report too much light in a room that looks normally lit, or eyewear for a person who is not wearing glasses.

Treat the `type` as an indication of the most likely cause, not as an exact description of what happened. The causes listed on this page are the ones most commonly linked to each type, with no guarantee that they are the real cause in a specific session.

When the analysis suspects that the capture is not of a real person in front of the camera, the liveness service returns generic guidance on purpose, so it does not reveal what was detected. In these cases, types such as `MOTION_ISSUE` and `DEVICE_ISSUE` may not reflect the real cause. This is one more reason to keep the messages neutral and to treat repeated failures as a pattern to investigate, not as a user mistake.

{% hint style="info" %}
The `description` can suggest something different from the recommended message. For example, the `description` of a motion issue may ask the user to try a different device. Always show the recommended message for the `type`, and suggest a different device only as a fallback, after several attempts.
{% endhint %}

### Rules for All Messages

1. **Guide the next attempt.** During the capture, the capture screen already shows real-time instructions, such as "Move closer" or "Please keep still". The messages on this page are shown after an unsuccessful attempt, so they say what to do on the next one.
2. **Security over specificity.** Never tell the user that fraud is suspected, which security check failed, or whether a face is registered for a person. This information helps whoever is trying to bypass the journey.
3. **Neutral tone.** Messages describe what to do, without saying what the person did wrong. The model's reading may be wrong, and an accusing message makes the experience worse for legitimate users.

{% hint style="info" %}
The recommended messages on this page come from a study by the Certta UX team. The study considered clarity, neutral language, accessibility and the security of the journey.
{% endhint %}

### Quick Reference

The failure types are the same on both platforms, with different spelling. The table shows both. The **Result image** column tells whether your backend can expect an image when it retrieves the result of the attempt.

The table lists only the types returned by the current versions. Older types that are no longer returned, such as `TOO_DARK` or `FACE_TOO_FAR`, are in [Legacy Types](#legacy-types).

<table><thead><tr><th width="184.921875">Android</th><th>iOS</th><th>Reason</th><th>Recommended message</th><th>Result image</th></tr></thead><tbody><tr><td><code>UNKNOWN</code></td><td><code>unknown</code></td><td>Unclassified failure</td><td>We couldn't complete the verification. Please try again.</td><td>Usually available</td></tr><tr><td><code>LIGHTING_ISSUES</code></td><td><code>lightingIssues</code></td><td>Unsuitable lighting</td><td>Make sure your face is well lit and free from glare.</td><td>Available</td></tr><tr><td><code>FACE_NOT_FOUND</code></td><td><code>faceNotFound</code></td><td>Face position in the guide</td><td>Hold the front camera at eye level.</td><td>Not available</td></tr><tr><td><code>EYES_CLOSED</code>, <code>EYEWEAR</code></td><td><code>eyesClosed</code>, <code>eyewear</code></td><td>Eye area not confirmed</td><td>Make sure your eyes are visible.</td><td>Available</td></tr><tr><td><code>OBSCURED_FACE</code></td><td><code>obscuredFace</code></td><td>Face covered</td><td>Make sure your whole face is visible and remove any accessories that might cover it.</td><td>Available</td></tr><tr><td><code>MULTIPLE_FACES</code></td><td><code>multipleFaces</code></td><td>More than one face</td><td>Make sure only your face appears on the screen.</td><td>Available</td></tr><tr><td><code>FRAMES_BLURRY</code></td><td><code>framesBlurry</code></td><td>Blurry image</td><td>Find a well-lit place, clean the front camera and hold your phone steady.</td><td>Available</td></tr><tr><td><code>MOTION_ISSUE</code></td><td><code>motionIssue</code></td><td>Movement inconsistency</td><td>Hold your phone still at eye level and fit your face in the oval.</td><td>Available</td></tr><tr><td><code>BACKGROUND_ISSUE</code></td><td><code>backgroundIssue</code></td><td>Background or contrast</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>DEVICE_ISSUE</code></td><td><code>deviceIssue</code></td><td>Device or environment</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>DEVICE_RESTART</code></td><td><code>deviceRestart</code></td><td>Device restart</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>SYSTEM_ERROR</code></td><td><code>systemError</code></td><td>System error</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>USER_NOT_FOUND</code></td><td><code>userNotFound</code></td><td>User not registered</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>REJECTED</code></td><td><code>rejected</code></td><td>Transaction rejected</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>TIMEOUT</code></td><td><code>timeout</code></td><td>Time limit reached</td><td>We couldn't complete the verification. Please try again.</td><td>Available</td></tr><tr><td><code>PROCESSING_FAULT</code></td><td><code>processingFault</code></td><td>Processing failure</td><td>We couldn't complete the verification. Please try again.</td><td>Not available</td></tr></tbody></table>

### Unclassified Failure

`UNKNOWN`

**What it means:** the session ended without approval, but the analysis could not assign a specific reason. It is an umbrella result: something prevented a safe decision, without saying what.

**Common causes:**

* Several small factors at the same time (a little movement, uneven lighting, the face slightly off-center).
* An ambiguous result, where the analysis did not gather enough evidence to decide.
* Old or entry-level devices with lower-quality cameras.
* Fraud prevention blocks.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. If it keeps happening, contact Certta support.

{% hint style="warning" %}
An `UNKNOWN` failure may not return a result image. When your backend retrieves the result of this attempt, the image may not be available, so any step that depends on it, such as face matching or saving a reference photo, may not run. Check whether the image is available before using it and ask the user for a new capture.
{% endhint %}

{% hint style="warning" %}
Since the real cause is unknown, avoid specific tips here. Wrong guidance, such as "find more light" when the problem was movement, tends to cause new failures and frustration. And since this type can also represent a security block, the message must not suggest any reason.
{% endhint %}

### Unsuitable Lighting

`LIGHTING_ISSUES`

**What it means:** the lighting got in the way of the analysis, but the result does not say whether there was too much or too little light. It usually involves strong light on the face, a dark environment, uneven light, shadows or reflections.

**Common causes:**

* Strong light pointed straight at the face, such as a flashlight, a lamp or direct sunlight.
* A bright window or strong light behind the user.
* A poorly lit room.
* Light coming from one side only, leaving half of the face in shadow.
* Strong reflections on the skin or on glasses.
* Accessories that cover part of the face and cast shadows or reflections on it, such as a headset or a cap.
* Colored lights in the environment (LED, TV, signs).
* The lighting changing during the capture.

In a completely dark environment, the capture does not start.

**Recommended message:** *Make sure your face is well lit and free from glare.*

**Behavior:** tip shown after the attempt.

**Retry:** yes. Let the user try again.

{% hint style="info" %}
The message does not say whether to make it brighter or darker on purpose, because the type does not say which of the two.
{% endhint %}

### Face Position in the Guide

`FACE_NOT_FOUND`

**What it means:** no face was found in the capture area at the moment of the capture.

**Common causes:**

* The face leaving the oval right before the capture.
* The phone below chin level.
* The face tilted, in profile or shifted to one side of the oval.
* The user looking at another point of the screen.
* The camera pointed somewhere else, or the capture started before the user was in position.
* A dark environment combined with a shaking device.
* The lens covered by a finger, a case or dirt.

**Recommended message:** *Hold the front camera at eye level.*

**Behavior:** tip shown after the attempt.

**Retry:** yes. Let the user try again.

{% hint style="info" %}
A `FACE_NOT_FOUND` does not return a result image. When your backend retrieves the result of this attempt, no image is available, so any step that depends on it, such as face matching or saving a reference photo, cannot run. Treat this attempt as having no image and ask the user for a new capture.
{% endhint %}

### Eye Area Not Confirmed

`EYES_CLOSED` `EYEWEAR`

**What it means:** the analysis could not confirm the eye area. In practice, both types lead to the same situation: the eyes were not visible clearly enough.

**Common causes:**

* Sunglasses, the most consistent cause of `EYEWEAR`.
* Blinking at the moment of the capture.
* Squinting because of the light.
* Looking down.
* Heavy eye makeup.
* A hand near the face.
* Accessories that cover part of the face near the eyes, such as a headset, a cap brim or a hood.

Prescription glasses usually do not cause this failure. It can also happen without glasses and with open eyes, because of a shadow or a reflection around the eyes, the phone angle, or a blurry image.

**Recommended message:** *Make sure your eyes are visible.*

**Behavior:** neutral tip shown after the attempt.

**Retry:** yes. Let the user try again.

{% hint style="warning" %}
The message is neutral on purpose. It does not say "your eyes were closed" or "remove your glasses", because the reading may be wrong. An accusing message for someone who is not wearing glasses causes embarrassment and gives the impression that the system made a mistake.
{% endhint %}

### Face Covered

`OBSCURED_FACE`

**What it means:** part of the face was covered by an object, which prevented a full analysis.

**Common causes:**

* A mask, scarf or turtleneck covering the mouth and chin.
* Accessories that cover part of the face, such as a headset with a microphone in front of the mouth.
* A hand touching the face.
* Hair or bangs over the eyes.
* A cap, hat or hood covering the forehead.
* A finger or case covering part of the lens.

**Recommended message:** *Make sure your whole face is visible and remove any accessories that might cover it.*

**Behavior:** tip shown after the attempt.

**Retry:** yes. Let the user try again.

### More Than One Face

`MULTIPLE_FACES`

**What it means:** more than one face was found in the image, and the analysis could not be sure which one belongs to the account holder.

**Common causes:**

* Another person behind or next to the user.
* A child on the user's lap.
* A photo, poster or TV with faces in the background.
* The user's own reflection in a mirror.

**Recommended message:** *Make sure only your face appears on the screen.*

**Behavior:** tip shown after the attempt.

**Retry:** yes. Let the user try again.

{% hint style="warning" %}
The message must ask that only the account holder appears. Avoid texts that encourage help from another person during the capture.
{% endhint %}

### Blurry Image

`FRAMES_BLURRY`

**What it means:** the captured images were not sharp enough for the analysis. This type also covers too much movement of the face or the device during the capture.

**Common causes:**

* A dark environment combined with a shaking device, where the camera cannot capture sharp images. This is the most common case.
* The user walking or inside a moving vehicle.
* Adjusting the phone position in the middle of the capture.
* A dirty or greasy front camera lens.
* A screen protector or case over the lens.
* Autofocus that did not adjust with the face too close.
* Accessories that cover part of the face, such as a headset.

**Recommended message:** *Find a well-lit place, clean the front camera and hold your phone steady.*

**Behavior:** tip shown after the attempt.

**Retry:** yes. Let the user try again.

### Movement Inconsistency

`MOTION_ISSUE`

**What it means:** the movement data recorded during the capture could not be used by the analysis. Besides the images, the analysis uses the motion data sent by the device. In most cases, this type means the device did not send this data correctly, for example because the motion sensor is missing, faulty or could not be read.

**Common causes:**

* The device not sending motion data correctly.
* No clear pattern, for example with a TV or monitor in the background, with a plain background or with the face turned in profile.

Moving or shaking the phone to fit the face in the oval does not usually cause this type: it tends to return `FRAMES_BLURRY` or `FACE_NOT_FOUND` instead. Since `MOTION_ISSUE` can also be generic guidance, it may not reflect the real cause. See [How to Read the `type`](#how-to-read-the-type).

**How to guide the user:** hold the phone still at eye level and move only the head to fit the face in the oval. A new attempt on the same device often succeeds. Suggesting another device only makes sense after several failures in a row.

**Recommended message:**

* First failure: *Hold your phone still at eye level and fit your face in the oval.*
* Repeated failures: *Hold your phone still at eye level and fit your face in the oval. If the problem continues, restart your device or try another one.*

**Behavior:** first failure, new attempt. Repeated failures, suggest restarting or changing the device only as a secondary tip.

**Retry:** yes. A new attempt on the same device often succeeds. If it keeps failing, suggest restarting the device or using another one.

{% hint style="warning" %}
On the first failure with this type, only ask for a new capture with the phone held still. Do not suggest changing or restarting the device right away: a new attempt on the same device often succeeds. If the same device fails again and again with this type, restarting it or trying another device is the next step.
{% endhint %}

### Background or Contrast

`BACKGROUND_ISSUE`

**What it means:** the background of the image made it hard to separate the face from the environment.

**Common causes:**

* A wall with a color similar to the skin tone.
* A very bright background, with strong light behind the user.
* A background with many elements, patterns or movement.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. Let the user try again.

### Device or Environment

`DEVICE_ISSUE`

**What it means:** this type groups failures of different natures, related to the user's behavior, the environment or the device itself. The evaluation includes the capture quality, the lighting conditions, the device context and how the camera works.

**Common causes:**

* Low capture quality.
* Unfavorable lighting.
* A camera problem, such as the camera being used by another app, or a momentary failure.
* Device settings outside the standard, such as an emulator, active debugging, jailbreak or root.

It is also returned when the analysis does not identify a real person in front of the camera, as generic guidance. See [How to Read the `type`](#how-to-read-the-type).

**Recommended message:**

* First failure: *We couldn't complete the verification. Please try again.*
* Repeated failures: *We couldn't complete the verification. Please try again. If the problem continues, restart your device or try another one.*

**Behavior:** first failure, new attempt. Repeated failures, suggest restarting or changing the device only as a secondary tip.

**Retry:** yes. A new attempt on the same device can succeed. If it keeps failing, suggest restarting the device or using another one.

{% hint style="warning" %}
On the first failure with this type, only ask for a new capture. Do not suggest changing or restarting the device right away. Since this type groups causes of different natures, the message must stay generic and must not suggest a specific reason.
{% endhint %}

{% hint style="info" %}
**Android:** debug builds and apps installed through ADB do not pass the liveness checks in the production and test environments. With `enableSecurity = true` (the default), a debuggable app is blocked earlier by the Certta device checks and the SDK returns a `SECURITY_EXCEPTION` error instead of a failure. With `enableSecurity = false`, the capture runs and returns `DEVICE_ISSUE`. See [Security Checks](https://docs.caf.io/sdk-lite/setup/android/security-checks.md) before testing.
{% endhint %}

### Device Restart

`DEVICE_RESTART`

**What it means:** the device is in a state that tends to be solved by restarting it.

**Common causes:**

* The camera or other device resources stuck after a long time without restarting.
* Overheating.
* Low available memory.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. A new attempt on the same device can succeed. If it keeps failing, suggest restarting the device or using another one.

{% hint style="info" %}
The current liveness analysis model is not expected to return this type. Keep handling it in your app in case it is returned.
{% endhint %}

{% hint style="info" %}
For your support team: when a user reaches support after repeated failures with this type, asking them to restart the device usually solves it.
{% endhint %}

### System Error

`SYSTEM_ERROR`

**What it means:** the liveness analysis is done by an AI model that works with confidence levels. Because of this, some captures do not reach the confidence needed to be approved or to fit a more specific failure. When this happens, or when an internal failure occurs in the processing, the analysis returns `SYSTEM_ERROR`. This does not mean the user did something wrong and, in most cases, a new attempt is enough to complete the verification.

**Common causes:**

* The AI model could not classify the capture with enough confidence, and the situation does not fit any of the more specific failures.
* A sudden change of lighting during the capture, such as a light being switched on or off.
* Momentary instability in the processing environment.
* A one-off communication failure between the components that process the analysis.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. If it keeps happening, contact Certta support.

### User Not Registered

`USER_NOT_FOUND`

**What it means:** there is no biometric record of the user to compare the capture against.

**When it happens:** only in flows that compare the face with a face registered before, such as face authentication. It never happens in liveness-only or enrollment flows.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** send the user to enrollment or to another channel.

**Retry:** no. A new attempt does not solve it.

{% hint style="warning" %}
Never tell the user that they are not registered. Keep the same message as the other failures, and route the user to enrollment or another channel on your side.
{% endhint %}

{% hint style="info" %}
The current liveness analysis model is not expected to return this type. Keep handling it in your app in case it is returned.
{% endhint %}

### Transaction Rejected

`REJECTED`

**What it means:** the capture was done, but the transaction was refused because the user is on a blocklist. This list can be kept by the liveness service, based on attacks already identified, or provided by the client, for users who must not be approved. The refusal is not related to the capture quality or the environment.

**Common causes:**

* A user linked to fraud attempts previously identified by the liveness service.
* A user added by the client to its own blocklist.

This is a rare situation.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt, with the same visible behavior as the other failures.

**Retry:** yes, with a limit of attempts on your side. A new attempt does not change the result. See the warning below.

{% hint style="warning" %}
Never tell the user that they are blocked or that a blocklist exists. The message and the screen behavior must be the same as for the other failures, so whoever is trying to bypass the journey cannot identify the reason for the refusal. A new attempt does not change the result, so apply a limit of attempts on your side and send the user to an alternative channel or a manual review.
{% endhint %}

{% hint style="info" %}
For your support team: when a user reaches support after repeated failures with this type, first check whether they are on your own blocklist. If they are not, analyze the case together with Certta.
{% endhint %}

### Time Limit Reached

`TIMEOUT`

**What it means:** the session went past the system time limit before it was completed.

**Common causes:**

* A slow or unstable connection while the capture is sent.
* A delay in processing the analysis.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. If it keeps happening, contact Certta support.

{% hint style="info" %}
When the user opens the capture and does not position the face before the capture time ends, the SDK does not return this type. The run ends with a `PROCESSING_FAULT` failure. See [Processing Failure](#processing-failure).
{% endhint %}

### Processing Failure

`PROCESSING_FAULT`

**What it means:** the capture ended, but it could not be processed.

**Common causes:**

* The capture time ending before the user positioned the face in the oval.
* A dark environment combined with a shaking device.
* An upload interrupted or incomplete because the connection dropped.
* A momentary failure in the analysis service.

**Recommended message:** *We couldn't complete the verification. Please try again.*

**Behavior:** new attempt.

**Retry:** yes. If it keeps happening, contact Certta support.

{% hint style="warning" %}
A `PROCESSING_FAULT` does not return a result image. When your backend retrieves the result of this attempt, no image is available, so any step that depends on it, such as face matching or saving a reference photo, cannot run. Treat this attempt as having no image and ask the user for a new capture.
{% endhint %}

## Legacy Types

The types below are still declared in `CafFailureType` so that existing integrations keep compiling, but the current versions no longer return them. The liveness service now returns the type in the **Now returned as** column for the same situations.

If your app already handles these types, keep the code and map each one to the same message as its current equivalent.

| Android                          | iOS                          | Now returned as                                                                                                                     | Recommended message                                                       |
| -------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `TOO_BRIGHT`, `TOO_DARK`         | `tooBright`, `tooDark`       | [`LIGHTING_ISSUES`](#unsuitable-lighting)                                                                                           | Make sure your face is well lit and free from glare.                      |
| `SUNGLASSES`                     | `sunglasses`                 | [`EYEWEAR`](#eye-area-not-confirmed)                                                                                                | Make sure your eyes are visible.                                          |
| `MISALIGNED_FACE`                | `misalignedFace`             | [`FACE_NOT_FOUND`](#face-position-in-the-guide)                                                                                     | Hold the front camera at eye level.                                       |
| `TOO_MUCH_MOVEMENT`              | `tooMuchMovement`            | [`FRAMES_BLURRY`](#blurry-image)                                                                                                    | Find a well-lit place, clean the front camera and hold your phone steady. |
| `FACE_TOO_FAR`, `FACE_TOO_CLOSE` | `faceTooFar`, `faceTooClose` | No failure. The capture does not start while the face is too far or too close, and the capture screen guides the user in real time. | Hold the front camera at eye level.                                       |

## Retries and Investigation

### Allowing new attempts

* Allow at least **two** attempts. Three is the recommended practice.
* Track **completion within three attempts per user** together with the first-attempt pass rate. As your user base grows, expect some genuine users to need more than one attempt.
* Each attempt is assessed on its own. A genuine user can fail one attempt and pass the next one in apparently the same conditions. That is the system working as designed.

### Helping users pass on the first attempt

Show short, visual guidance before the capture. These tips cover most failures:

* Hold the phone at eye level and align the face in the oval.
* Move your head, not the phone, to align the face with the oval.
* Once the face is in the oval, keep still until the capture ends.
* Make sure the face is well lit, with no strong light behind the user.
* Keep the whole face visible, with eyes open.
* Avoid capturing inside a moving vehicle.

### Investigating cases

* Look at completion per user, not at isolated attempts.
* Look for patterns by device model, operating system version and SDK version.
* Check the failure types returned for each attempt.
* Compare each case against the guidance on this page before escalating.

When you escalate a case to Certta support, send the date and time, the failure `type` and the `signedResponse` of **every attempt** of the user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.caf.io/sdk-lite/failure-handling/mobile/failure-handling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
