> 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, 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 para 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. Llamar a `getSdkErrorCode()` para obtener `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. Llamar 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 [API de Android](/nfc-wallet-sdk-android/es/android-api.md).
{% endhint %}

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

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

### Detalles del error del servidor

Cuando reciba `COMMON_SERVER_ERROR`, llame a `getCpsErrorCode()`. Además, llame a `getErrorMessage()`.

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

* `KnownCpsErrorCodes`
* `KnownMessageCode`

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

{% hint style="warning" %}
No vuelva a intentar automáticamente la misma solicitud cuando reciba estos errores. Informe al usuario final. Pídale que se ponga en contacto con 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.
