在为以下请求调用Saber BargainFinderMax REST API时,偶尔会出现错误:
{
"OTA_AirLowFareSearchRQ":{
"OriginDestinationInformation":[
{
"DepartureDateTime":"2018-09-22T00:00:00",
"DestinationLocation":{
"LocationCode":"DEL"
},
"OriginLocation":{
"LocationCode":"BOM"
},
"RPH":"0"
},
{
"DepartureDateTime":"2018-09-29T00:00:00",
"DestinationLocation":{
"LocationCode":"BOM"
},
"OriginLocation":{
"LocationCode":"DEL"
},
"RPH":"1"
}
],
"TravelPreferences":{
"ValidInterlineTicket":true,
"CabinPref":[
{
"Cabin":"Y",
"PreferLevel":"Preferred"
}
]
},
"POS":{
"Source":[
{
"PseudoCityCode":"J6UJ",
"RequestorID":{
"CompanyName":{
"Code":"TN"
},
"ID":"REQ.ID",
"Type":"0.AAA.X"
}
}
]
},
"TPA_Extensions":{
"IntelliSellTransaction":{
"RequestType":{
"Name":"50ITINS"
}
}
},
"TravelerInfoSummary":{
"AirTravelerAvail":[
{
"PassengerTypeQuantity":[
{
"Code":"ADT",
"Quantity":1
}
]
}
],
"PriceRequestInformation":{
"CurrencyCode":"USD"
}
}
}
}
回复错误代码-ERR.2SG.PROVIDER_TIMEOUT
{
"status":"NotProcessed",
"type":"Transport",
"errorCode":"ERR.2SG.PROVIDER_TIMEOUT",
"timeStamp":"2018-09-08T11:09:38.819-05:00",
"message":"Connection error"
}
回复错误代码-ERR.2SG.SEC.MISSING_CREDENTIALS
{
"status":"NotProcessed",
"type":"Validation",
"errorCode":"ERR.2SG.SEC.MISSING_CREDENTIALS",
"timeStamp":"2018-09-08T11:26:06.919-05:00",
"message":"Authentication data is missing"
}
回复错误代码-WARN.RAF.APPLICATION
{
"status":"Complete",
"reportingSystem":"RAF",
"timeStamp":"2018-09-08T19:03:26+00:00",
"type":"Application",
"errorCode":"WARN.RAF.APPLICATION",
"instance":"raf-darhlc006.sabre.com-8080",
"message":"{\"OTA_AirLowFareSearchRS\":{\"PricedItinCount\":0,\"BrandedOneWayItinCount\":0,\"SimpleOneWayItinCount\":0,\"DepartedItinCount\":0,\"SoldOutItinCount\":0,\"AvailableItinCount\":0,\"Version\":\"4.2.0\",\"Errors\":{\"Error\":[{\"Type\":\"SCHEDULES\",\"ShortText\":\"DSF server returned an error: unknown BRD airport=BOM\",\"Code\":\"PROCESS\",\"content\":\"\"},{\"Type\":\"SCHEDULES\",\"ShortText\":\"DSF server returned an error: unknown OFF airport=BOM\",\"Code\":\"PROCESS\",\"content\":\"\"},{\"Type\":\"IF2\",\"ShortText\":\"No complete journey can be built in IF2/ADVJR1.\",\"Code\":\"PROCESS\",\"content\":\"\"},{\"Type\":\"WORKERTHREAD\",\"ShortText\":\"4220224579781953781\",\"Code\":\"TRANSACTIONID\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"SERVER\",\"ShortText\":\"27033\",\"Code\":\"ASECT2LAPC00015.IDM.SGDCPROD.SABRE.COM\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"DRE\",\"ShortText\":\"21728\",\"Code\":\"RULEID\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"DEFAULT\",\"ShortText\":\"25238\",\"Code\":\"RULEID\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"SCHEDULES\",\"ShortText\":\"NO FLIGHTS FOUND FOR BOM-DEL\",\"Code\":\"MSG\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"SCHEDULES\",\"ShortText\":\"NO FLIGHTS FOUND FOR DEL-BOM\",\"Code\":\"MSG\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"SCHEDULES\",\"ShortText\":\"NO FLIGHT SCHEDULES FOR QUALIFIERS USED\",\"Code\":\"MSG\",\"MessageClass\":\"I\",\"content\":\"\"},{\"Type\":\"ERR\",\"ShortText\":\"Error during Processing\",\"Code\":\"ERR\",\"content\":\"\"}]}},\"Links\":[{\"rel\":\"self\",\"href\":\"https://api-crt.cert.havail.sabre.com/v4.2.0/shop/flights?mode=live\"},{\"rel\":\"linkTemplate\",\"href\":\"https://api-crt.cert.havail.sabre.com//shop/flights?mode=&limit=&offset=&enabletagging=\"}]}"
}
响应无误
{
"OTA_AirLowFareSearchRS":{
"PricedItinCount":50,
"BrandedOneWayItinCount":0,
"SimpleOneWayItinCount":0,
"DepartedItinCount":0,
"SoldOutItinCount":0,
"AvailableItinCount":0,
"Version":"4.2.0",
"Success":{
},
"Warnings":{...},
"PricedItineraries":{...},
"TPA_Extensions":{...}
},
"Links":[...]
}
该网站当前正在使用Saber Test Environment进行REST API调用。
API有时会返回上述错误代码的原因是什么? 转移到生产环境中会消除这些错误吗?
感谢您为解决上述问题提供的任何帮助。
答案 0 :(得分:0)
尽管生产环境中的错误明显减少,但是可以发现这些错误,因此您应该在应用程序中考虑这些错误。
ERR.2SG.PROVIDER_TIMEOUT是一个超时响应,也可能在生产环境中发生。在测试环境中更常见。
ERR.2SG.SEC.MISSING_CREDENTIALS,因为您缺少会话详细信息。
WARN.RAF.APPLICATION意味着存在验证错误或请求中的某些内容无效。