Errores de la API

Cuando una API de Vonage devuelve un error —por ejemplo, si tu cuenta no tiene saldo—, la API devolverá un error con el formato « RFC 7807 ».

Aquí se ofrece una explicación básica de en qué consiste el problema, por qué se ha producido y los pasos a seguir para resolverlo. Echa un vistazo al ejemplo para ver cómo se estructura un informe de « out-of-credit ».

Probablemente te interese plantearte desde el principio qué errores tendrá que gestionar tu aplicación; en esta página encontrarás una lista de todos los errores posibles que podrían producirse, junto con una explicación más detallada de cómo se pueden resolver.

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
Content-Language: en
{
  "type": "https://example.com/Error#out-of-credit",
  "title": "You do not have enough credit",
  "detail": "Your current balance is 30, but that costs 50.",
  "instance": "<trace_id>"
}

Configuración de WhatsApp

CódigoInformación
number-in-use

Descripción

Cannot use number because it's already in use by another deployment.

Resolución

Use the existing deployment.

invalid-json

Descripción

The request body did not contain valid JSON

Resolución

Send a JSON request body, including a Content-Type header of application/json

unprocessable

Descripción

Parameters were valid JSON but something was missing or wrongly formatted

Resolución

Fix the incorrect request parameters and try again

unprocessable-profile-update

Descripción

Parameters were valid JSON but something was missing or wrongly formatted

Resolución

Fix the incorrect request parameters and try again

throttled

Descripción

Too many requests have been made on this endpoint

Resolución

Wait a moment and try again

verification-failed

Descripción

Verification step failed. Either because the provided code was incorrect or because too many attempts have been made

Resolución

Try again with the correct OTP, or call resend-otp

conflict-deployment-state

Descripción

Deployment could not be modified because it is currently in a transitional state.

Resolución

If the deployment is transitioning into the state you want it in no action is required. If the state is DELETING, no action is required as the deployment will be deleted. Otherwise, wait for the transition to complete and try again.

conflict-resend-otp

Descripción

Could not resend OTP because the current state of the deployment did not allow it

Resolución

The deployment has either already finished, or is in an error state (in which case you should delete it and run it again).