-
Error and Exception Handling
-
-
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Error and Exception Handling
This section covers error handling support for NITRO APIs and exception handling support for SDKs.
Error Handling for NITRO APIs
In case of a failed request, NITRO provides the required information through the HTTP status code and in the response header and response payload.
- Error in a Single Resource Operation
- Error in a Bulk Operations
-
Warnings
-
Error in a Single Resource Operation
The response of a single erroneous operation is as follows:
-
Response
HTTP Status Code:
4xx <string> (for general HTTP errors) or 5xx <string> (for Citrix-ADC-specific errors)
Response Header:
Content-Type:application/json
Response Payload:
{
errorcode: <Error code>,
message: "<Error message>",
severity: "ERROR"
}
<!--NeedCopy-->
-
Error in a Bulk Operation
When there is a failure in one of the bulk operations, the response payload gives a combination of success and failure (depends on the value set for X-NITRO-ONERROR in the request header).
-
Response
HTTP Status Code:
207 Multi Status
Response Header:
Content-Type:application/json
Response Payload when X-NITRO-ONERROR is set to continue:
When the first operation fails, the request is not terminated. The response payload shows the error details of the failed operation and the success status of the other operations.
{
"errorcode": 1243,
"message": "Bulk operation failed",
"severity": "ERROR",
"response":
[
{
"errorcode": 273,
"message": "Resource already exists",
"severity": "ERROR"
},
{
"errorcode": 0,
"message": "Done",
"severity": "NONE"
}
]
}
<!--NeedCopy-->
Response Payload when X-NITRO-ONERROR is set to exit:
When the first operation fails, the request is terminated. The response payload only shows the error details of the failed operation.
{
"errorcode": 1243,
"message": "Bulk operation failed",
"severity": "ERROR",
"response":
[
{
"errorcode": 273,
"message": "Resource already exists",
"severity": "ERROR"
}
]
}
<!--NeedCopy-->
-
Warnings in NITRO Operations
Warnings can be captured by specifying the “warning” query parameter as “yes” when performing any NITRO operation. For example, to get warnings while connecting to the Citrix ADC appliance, the URL is as follows:
http://<Citrix-ADC-IP-address(NSIP)>/nitro/v1/config/llbvserver?warning=yes
If there are any warnings, the response is as follows:
-
Response
HTTP Status Code:
209 X-NITRO-WARNING
Response Header:
X-NITRO-WARNING →1067 - Feature(s) not enabled [LB]
Exception Handling Support for SDKs
The status of a NITRO request is captured in the com.citrix.netscaler.nitro.exception.nitro_exception class. This class provides the following details of the exception:
-
Session ID
. The session in which the exception occurred. -
Severity
. The severity of the exception: error or warning. By default, only errors are captured. To capture warnings, you must set the warning flag to true, while connecting to the appliance. -
Error code
. The status of the NITRO request. An error code of 0 indicates that the NITRO request is successful. A non-zero error code indicates an error in processing the NITRO request. -
Error message
. Provides a brief description of the exception.
For a list of error codes, see the errorlisting.html file available in the <NITRO_SDK_HOME>/doc/api_reference folder.
Share
Share
In this article
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.