> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/error-management/cps-error-management/provisioningserviceerror.md).

# ProvisioningServiceError

### Descripción general

Durante la tokenización, usted usa `ProvisioningServiceManager`. Si una operación falla, el SDK lanza `ProvisioningServiceError`.

Use `ProvisioningServiceError` para leer la categoría y los detalles del error:

* `getSdkErrorCode()`: Devuelve `ProvisioningServiceErrorCodes`.
* `getCpsErrorCode()`: Devuelve el código de error del servidor CPS.
* `getHttpStatusCode()`: Devuelve el código de estado HTTP.
* `getErrorMessage()`: Devuelve un mensaje legible por humanos.
* `getTokenId()`: Devuelve el ID del token, cuando es específico de la tarjeta.
* `getStatusAdditionalInfo()`: Devuelve detalles adicionales de la solicitud CPS, cuando están disponibles.

Esta sección muestra cómo analizar el error.

### Analizar el error

Cuando el SDK lanza `ProvisioningServiceError`, analícelo de la siguiente manera:

1. Llame a `getSdkErrorCode()` para recuperar `ProvisioningServiceErrorCodes`.
2. Si el código es igual a `COMMON_COMM_ERROR`, llame a `getHttpStatusCode()`.
3. Si el código es igual a `COMMON_SERVER_ERROR`, llame a `getCpsErrorCode()`.
4. Llame a `getErrorMessage()` para obtener un mensaje descriptivo.
5. Si el error es específico de la tarjeta, llame a `getTokenId()`.
6. Si el error está relacionado con una solicitud CPS, llame a `getStatusAdditionalInfo()`.

{% hint style="info" %}
Otros errores tienen una estructura similar. Para más detalles, consulte [Android API](/nfc-wallet-sdk-android/es/android-api.md).
{% endhint %}

Revise todos los valores en `ProvisioningServiceErrorCodes` en [Android API](/nfc-wallet-sdk-android/es/android-api.md). Por ejemplo:

* `COMMON_COMM_TIMEOUT_ERROR`: Tiempo de espera de conexión al abrir una conexión con el servidor.
* `COMMON_NO_INTERNET`: No hay conexión de datos disponible.

### Detalles del error del servidor

Cuando reciba `COMMON_SERVER_ERROR`, llame a `getCpsErrorCode()`. También llame a `getErrorMessage()`.

Use estas clases para códigos y mensajes de error conocidos del servidor:

* `KnownCpsErrorCodes`
* `KnownMessageCode`

{% hint style="info" %}
Los códigos de error y los mensajes de error listados aquí no son exhaustivos.
{% endhint %}

{% hint style="warning" %}
No reintente automáticamente la misma solicitud cuando reciba estos errores. Informe al usuario final. Pídales que contacten a su equipo de soporte con el código de error del servidor.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/error-management/cps-error-management/provisioningserviceerror.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
