edit-icon download-icon

How to obtain the error message

最終更新日: Apr 04, 2018

If the API request reaches the gateway, the gateway returns the request result message.

Check the request header in the returned result. Results starting with X-Ca are all returned from the gateway. The important message contained in the result includes:

X-Ca-Request-Id: 7AD052CB-EE8B-4DFD-BBAF-EFB340E0A5AF 
//The unique ID of the request. Once the request reaches the API gateway, the API gateway generates a request ID and returns it to the client through the response header. We recommend that you record the request ID in both the client and backend services for troubleshooting and tracing.

X-Ca-Error-Message: Invalid Url  
//An error message returned from the API Gateway. When a request fails, the API Gateway returns the error message to the client through the response header.

X-Ca-Debug-Info: {"ServiceLatency":0,"TotalLatency":2}  
//A debug message returned when the debug mode is enabled. The message can be changed later and is used only for reference at the debugging stage.

The header in X-Ca-Error-Message essentially clarifies the error cause. The X-Ca-Request-Id can be provided to technical support engineers for log searching.