Apigee Edge का दस्तावेज़ देखा जा रहा है.
Apigee X के दस्तावेज़ पर जाएं. info
ExecutionFailed
गड़बड़ी कोड
steps.jsonthreatprotection.ExecutionFailed
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: error_description at line line_num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ियों के टाइप और उनकी संभावित वजहें
JSONThreatProtection नीति, ExecutionFailed से जुड़ी कई तरह की गड़बड़ियां दिखा सकती है. यहां दी गई टेबल में, अलग-अलग तरह की गड़बड़ियों और उनकी संभावित वजहों के बारे में बताया गया है:
| गड़बड़ी का टाइप | वजह |
| ऑब्जेक्ट एंट्री के नाम की लंबाई तय सीमा से ज़्यादा है | किसी ऑब्जेक्ट के एंट्री नेम में, स्ट्रिंग की तय सीमा से ज़्यादा वर्ण नहीं हो सकते. |
| ऑब्जेक्ट एंट्री की संख्या तय सीमा से ज़्यादा है | किसी ऑब्जेक्ट में ज़्यादा से ज़्यादा एंट्री करने की अनुमति है. |
| ऐरे एलिमेंट की संख्या तय सीमा से ज़्यादा है | ऐरे में ज़्यादा से ज़्यादा एलिमेंट शामिल किए जा सकते हैं. |
| कंटेनर की डेप्थ तय सीमा से ज़्यादा है | नेस्ट किए गए ऑब्जेक्ट की तय सीमा से ज़्यादा गहराई है. |
| स्ट्रिंग वैल्यू की लंबाई तय सीमा से ज़्यादा है | स्ट्रिंग वैल्यू के लिए तय की गई ज़्यादा से ज़्यादा लंबाई से ज़्यादा वर्णों का इस्तेमाल किया गया है. |
| अमान्य JSON ऑब्जेक्ट | इनपुट किया गया JSON पेलोड अमान्य है. |
ऑब्जेक्ट एंट्री के नाम की लंबाई तय सीमा से ज़्यादा है
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: Exceeded object entry name length at line line_num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]:
Exceeded object entry name length at line 2",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब <Source> एलिमेंट से तय किए गए इनपुट मैसेज पेलोड में, <ObjectEntryNameLength> एलिमेंट में तय की गई ज़्यादा से ज़्यादा लंबाई से ज़्यादा लंबाई वाला प्रॉपर्टी नेम मौजूद हो.
उदाहरण के लिए, अगर नीति में <ObjectEntryNameLength> एलिमेंट की वैल्यू 5 के तौर पर तय की गई है, लेकिन इनपुट मैसेज के पेलोड में मौजूद JSON प्रॉपर्टी का नाम पांच वर्णों से ज़्यादा है, तो यह गड़बड़ी दिखेगी.
संक्रमण की जांच
गड़बड़ी के मैसेज की जांच करके, JSONThreatProtection नीति का नाम और लाइन नंबर का पता लगाएं. इस लाइन नंबर पर, लंबी एंट्री का नाम मौजूद होता है. उदाहरण के लिए, यहां दिए गए गड़बड़ी के मैसेज में, JSONThreatProtection नीति का नाम
JSON-Threat-Protection-1है और पेलोड में लाइन नंबर 2 है.JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded object entry name length at line 2पहले चरण में पहचानी गई नीति की जांच करें. साथ ही,
<ObjectEntryNameLength>एलिमेंट में दी गई वैल्यू नोट करें.उदाहरण के लिए, यहां दी गई JSONThreatProtection नीति में,
<ObjectEntryNameLength>को5पर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>12</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>5</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>इनपुट पेलोड के उस लाइन नंबर की जांच करें जिसे पहले चरण में पहचाना गया था. साथ ही, देखें कि ऑब्जेक्ट के नाम की लंबाई,
<ObjectEntryNameLength>एलिमेंट में दी गई वैल्यू से ज़्यादा तो नहीं है. इस एलिमेंट की पहचान दूसरे चरण में की गई थी. अगर ऑब्जेक्ट के नाम की लंबाई इस संख्या से ज़्यादा है, तो गड़बड़ी की वजह यही है.यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "number" : 500, "string" : "text" }ऊपर दिखाए गए JSON पेलोड की दूसरी लाइन में,
numberनाम की एक प्रॉपर्टी है. इसमें छह वर्ण हैं (नाम की लंबाई छह है). ऑब्जेक्ट के नाम की लंबाई 5 से ज़्यादा है. यह<ObjectEntryNameLength>एलिमेंट के लिए तय की गई वैल्यू है. इसलिए, आपको यह गड़बड़ी दिखेगी:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded object entry name length at line 2
रिज़ॉल्यूशन
अगर JSONThreatProtection नीति का मकसद, ऑब्जेक्ट एंट्री के ऐसे नामों वाले पेलोड से सुरक्षा करना था जिनकी वैल्यू तय की गई वैल्यू से ज़्यादा है, तो गड़बड़ी का मैसेज दिखेगा. इस मामले में, आपको कुछ और करने की ज़रूरत नहीं है.
हालांकि, अगर आपको लगता है कि पेलोड में ऑब्जेक्ट एंट्री के लंबे नाम बिना किसी समस्या के दिए जा सकते हैं, तो अपनी ज़रूरतों के हिसाब से <ObjectEntryNameLength> की वैल्यू में बदलाव करें.
उदाहरण के लिए, अगर आपको लगता है कि ऑब्जेक्ट के नाम ज़्यादा से ज़्यादा 10 वर्णों के हो सकते हैं, तो JSONThreatProtection नीति में इस तरह बदलाव करें:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>12</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>10</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>
ऑब्जेक्ट एंट्री की संख्या तय सीमा से ज़्यादा है
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: Exceeded object entry count at line line_num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]:
Exceeded object entry count at line 7",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब <Source> एलिमेंट से तय किए गए इनपुट मैसेज पेलोड में ऐसा JSON ऑब्जेक्ट शामिल होता है जिसमें नीति के <ObjectEntryCount> एलिमेंट में तय की गई वैल्यू से ज़्यादा एंट्री (प्रॉपर्टी) होती हैं.
उदाहरण के लिए, अगर <ObjectEntryCount>एलिमेंट की वैल्यू 5 है, लेकिन इनपुट JSON पेलोड में पांच से ज़्यादा एंट्री हैं, तो यह गड़बड़ी दिखती है.
संक्रमण की जांच
गड़बड़ी के मैसेज की जांच करें. इससे JSONThreatProtection नीति का नाम और लाइन नंबर का पता चलेगा. इस लाइन नंबर पर, एंट्री की संख्या तय सीमा से ज़्यादा है. उदाहरण के लिए, इस गड़बड़ी के मैसेज में नीति का नाम
JSON-Threat-Protection-1है और पेलोड में लाइन नंबर7है:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded object entry count at line 7नीति के
<ObjectEntryCount>एलिमेंट में दी गई वैल्यू नोट करें. यह एलिमेंट, पहले चरण में पहचाना गया था.नीति के इस उदाहरण में,
<ObjectEntryCount>को5पर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>12</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>6</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>इनपुट पेलोड की उस लाइन की जांच करें जिसे पहले चरण में पहचाना गया था. साथ ही, यह देखें कि पेलोड में मौजूद इकाइयों की संख्या,
<ObjectEntryCount>एलिमेंट के लिए तय की गई वैल्यू से ज़्यादा है या नहीं. इस एलिमेंट की पहचान दूसरे चरण में की गई थी. अगर ऑब्जेक्ट की संख्या, ऑब्जेक्ट एंट्री की संख्या से ज़्यादा है, तो गड़बड़ी की वजह यही है.यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "name" : "John", "id" : 234687, "age" : 31, "city" : "New York", "country" : "USA", "company" : "Google" }ऊपर दिखाए गए JSON पेलोड में, छठी एंट्री लाइन #7 (कंपनी) पर है. इनपुट JSON पेलोड में ऑब्जेक्ट एंट्री की संख्या पांच से ज़्यादा है. यह संख्या,
<ObjectEntryCount>एलिमेंट के लिए तय की गई वैल्यू है. इसलिए, आपको यह गड़बड़ी दिखेगी:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded object entry count at line 7
रिज़ॉल्यूशन
अगर JSONThreatProtection नीति का मकसद, ऑब्जेक्ट एंट्री की संख्या वाले पेलोड से सुरक्षा करना था, तो गड़बड़ी का मैसेज दिखेगा. इस मामले में, आपको कोई और कार्रवाई करने की ज़रूरत नहीं है.
हालांकि, अगर आपको लगता है कि पेलोड में ज़्यादा ऑब्जेक्ट एंट्री शामिल की जा सकती हैं और इससे कोई असर नहीं पड़ेगा, तो अपनी ज़रूरतों के हिसाब से <ObjectEntryCount> की वैल्यू बदलें.
उदाहरण के लिए, अगर आपको लगता है कि ज़्यादा से ज़्यादा 10 ऑब्जेक्ट एंट्री की अनुमति दी जा सकती है, तो JSONThreatProtection नीति में इस तरह बदलाव करें:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>12</ContainerDepth>
<ObjectEntryCount>10</ObjectEntryCount>
<ObjectEntryNameLength>6</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>
ऐरे एलिमेंट की संख्या तय सीमा से ज़्यादा है
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: Exceeded array element count at line line-num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]:
Exceeded array element count at line 3",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब <Source> एलिमेंट से तय किए गए इनपुट मैसेज पेलोड में, JSON कलेक्शन में मौजूद एलिमेंट की संख्या, नीति के <ArrayElementCount> एलिमेंट में तय की गई संख्या से ज़्यादा होती है.
उदाहरण के लिए, अगर <ArrayElementCount> एलिमेंट को 3 के तौर पर तय किया गया है, लेकिन इनपुट पेलोड में तीन से ज़्यादा एलिमेंट वाला JSON कलेक्शन है, तो यह गड़बड़ी दिखेगी.
संक्रमण की जांच
गड़बड़ी के मैसेज की जांच करें. इससे आपको नीति के नाम और लाइन नंबर का पता चलेगा. इस लाइन नंबर पर, कलेक्शन की लंबाई तय सीमा से ज़्यादा है. उदाहरण के लिए, इस गड़बड़ी के मैसेज में नीति का नाम
JSON-Threat-Protection-1है और पेलोड में लाइन नंबर3है:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded array element count at line 3नीति के
<ArrayElementCount>एलिमेंट के लिए दी गई वैल्यू को नोट करें. यह एलिमेंट, पहले चरण में पहचाना गया था.JSONThreatProtection नीति के इस उदाहरण में,
<ArrayElementCount>को3पर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>12</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>6</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>इनपुट पेलोड के उस लाइन नंबर की जांच करें जिसे पहले चरण में पहचाना गया था. साथ ही, देखें कि क्या वहां मौजूद कलेक्शन में,
<ArrayElementCount>एलिमेंट (जिसे दूसरे चरण में पहचाना गया था) में बताई गई संख्या से ज़्यादा संख्या है. अगर ऐरे एलिमेंट की संख्या, गिनती से ज़्यादा है, तो यह गड़बड़ी की वजह है.यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "name":"Ford", "models":[ "Mustang", "Endeavour", "Fiesta", "EcoSport", "Focus" ] }ऊपर दिखाए गए JSON पेलोड में, लाइन 3 पर मौजूद
modelsनाम की ऐरे में पांच एलिमेंट हैं. ऐरे एलिमेंट की संख्या 3 से ज़्यादा है. यह<ArrayElementCount>एलिमेंट के लिए तय की गई वैल्यू है. इसलिए, आपको यह गड़बड़ी दिखती है:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded array element count at line 3
रिज़ॉल्यूशन
अगर JSONThreatProtection नीति का मकसद, किसी खास थ्रेशोल्ड से ज़्यादा कलेक्शन वाले पेलोड से सुरक्षा करना था, तो गड़बड़ी का मैसेज दिखेगा. इस मामले में, आपको कुछ और करने की ज़रूरत नहीं है.
हालांकि, अगर आपको लगता है कि किसी ऐरे में ज़्यादा एलिमेंट इस्तेमाल किए जा सकते हैं, तो अपनी ज़रूरतों के हिसाब से <ArrayElementCount> की वैल्यू में बदलाव करें.
उदाहरण के लिए, अगर आपको लगता है कि पांच ऐरे एलिमेंट इस्तेमाल करने की अनुमति दी जा सकती है, तो नीति में इस तरह बदलाव करें:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>5</ArrayElementCount>
<ContainerDepth>12</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>6</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>
कंटेनर की गहराई तय सीमा से ज़्यादा है
गड़बड़ी के जवाब का मुख्य हिस्सा
रनटाइम ट्रैफ़िक, गड़बड़ी के इस मैसेज के साथ 500 रिस्पॉन्स कोड दिखाता है:
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: Exceeded container depth at line line-num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]:
Exceeded container depth at line 5",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब <Source> एलिमेंट से तय किए गए इनपुट मैसेज पेलोड में ऐसा JSON ऑब्जेक्ट शामिल होता है जिसमें कंटेनर की डेप्थ वाले JSON एलिमेंट शामिल होते हैं. कंटेनर की यह डेप्थ, नीति के <ContainerDepth> एलिमेंट में तय की गई कंटेनर की ज़्यादा से ज़्यादा डेप्थ से ज़्यादा होती है. कंटेनर डेप्थ, JSON एलिमेंट के लिए नेस्ट किए गए ज़्यादा से ज़्यादा डेप्थ की अनुमति है. उदाहरण के लिए, अगर किसी कलेक्शन में ऐसा ऑब्जेक्ट है जिसमें एक और ऑब्जेक्ट है, तो कंटेनमेंट डेप्थ 3 होगी.
उदाहरण के लिए, अगर <ContainerDepth> एलिमेंट 3 है, लेकिन इनपुट पेलोड में कंटेनर की डेप्थ इस सीमा से ज़्यादा है, तो यह गड़बड़ी दिखती है.
संक्रमण की जांच
गड़बड़ी के मैसेज की जांच करें. इससे आपको JSONThreatProtection नीति के नाम और उस लाइन नंबर का पता चलेगा जहां कंटेनर की डेप्थ तय सीमा से ज़्यादा है. उदाहरण के लिए, गड़बड़ी के इस मैसेज में नीति का नाम
JSON-Threat-Protection-1है और पेलोड में लाइन नंबर5है.JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded container depth at line 5<ContainerDepth>एलिमेंट के लिए दी गई वैल्यू नोट करें. यह वैल्यू, पहले चरण में तय की गई थी.JSONThreatProtection नीति के इस उदाहरण में,
<ContainerDepth>को5पर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>5</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>20</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>इनपुट पेलोड की उस लाइन की जांच करें जिसे पहले चरण में पहचाना गया था. साथ ही, यह देखें कि पेलोड में कंटेनर की डेप्थ,
<ContainerDepth>एलिमेंट में दी गई वैल्यू से ज़्यादा है या नहीं. इस एलिमेंट की पहचान दूसरे चरण में की गई थी. अगर कंटेनर की डेप्थ, गिनती से ज़्यादा है, तो यह गड़बड़ी की वजह है.यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "ContainerDepth2":[ { "ContainerDepth4":[ { "ContainerDepth6":[ "1", "2" ] } ] } ] }ऊपर दिखाए गए JSON पेलोड में, लाइन 5 पर कंटेनर की डेप्थ 6 है. गहराई 5 से ज़्यादा होने की वजह से, JSONThreatProtection नीति के
<ContainerDepth>एलिमेंट के लिए तय की गई वैल्यू में यह गड़बड़ी दिखती है:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded container depth at line 5
रिज़ॉल्यूशन
अगर JSONThreatProtection नीति का मकसद, कंटेनर डेप्थ वाली ऐसी पेलोड से सुरक्षा करना था जो तय की गई वैल्यू से ज़्यादा है, तो गड़बड़ी का मैसेज दिखेगा. इस मामले में, आपको कुछ और करने की ज़रूरत नहीं है.
हालांकि, अगर आपको लगता है कि कंटेनर की ज़्यादा गहराई स्वीकार की जा सकती है, तो अपनी ज़रूरतों के हिसाब से <ContainerDepth> एट्रिब्यूट की वैल्यू में बदलाव करें.
उदाहरण के लिए, अगर आपको लगता है कि कंटेनर की गहराई 10 तक हो सकती है, तो नीति में इस तरह बदलाव करें:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>10</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>20</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>
स्ट्रिंग वैल्यू की लंबाई तय सीमा से ज़्यादा है
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: JSONThreatProtection[policy_name]: Exceeded string value length at line line-num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]:
Exceeded string value length at line 3",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब <Source> एलिमेंट से तय किए गए इनपुट मैसेज पेलोड में ऐसे JSON एलिमेंट शामिल हों जिनकी वैल्यू में, <StringValueLength> एलिमेंट के लिए तय किए गए वर्णों की संख्या से ज़्यादा वर्ण हों.
उदाहरण के लिए, अगर नीति में <StringValueLength> एलिमेंट को 50 पर सेट किया गया है, लेकिन इनपुट पेलोड में एक या उससे ज़्यादा ऐसे एलिमेंट हैं जिनकी वैल्यू में 50 से ज़्यादा वर्ण हैं, तो यह गड़बड़ी दिखती है.
संक्रमण की जांच
गड़बड़ी के मैसेज को ध्यान से पढ़ें. इससे आपको नीति के नाम और लाइन नंबर का पता चलेगा. साथ ही, यह भी पता चलेगा कि स्ट्रिंग की लंबाई कहां तय सीमा से ज़्यादा है. यहां दिए गए उदाहरण में, नीति का नाम
JSON-Threat-Protection-1 andलाइन में पेलोड3है.JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded string value length at line 3पहले चरण में पहचाने गए
<StringValueLength>एलिमेंट के लिए दी गई वैल्यू को नोट करें.JSONThreatProtection नीति के इस उदाहरण में,
<StringValueLength>को50पर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>5</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>20</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>इनपुट पेलोड की उस लाइन की जांच करें जिसमें गड़बड़ी हुई है (पहले चरण में इसकी पहचान की गई है). साथ ही, देखें कि वैल्यू की लंबाई,
<StringValueLength>एलिमेंट के लिए तय किए गए वर्णों की संख्या से ज़्यादा तो नहीं है (दूसरे चरण में इसकी पहचान की गई है). अगर वैल्यू की लंबाई तय सीमा से ज़्यादा है, तो गड़बड़ी की वजह यही है.यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "Country": "New Zealand", "Place Name": "Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" }ऊपर दिखाए गए JSON पेलोड में,
Place Nameनाम का एक ऑब्जेक्ट है. इसकी वैल्यूTaumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahuमें तीसरी लाइन में 85 वर्ण हैं. वैल्यू की लंबाई 50 से ज़्यादा होने की वजह से,<StringValueLength>एलिमेंट में दी गई वैल्यू के लिए आपको यह गड़बड़ी दिखेगी:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: JSONThreatProtection[JSON-Threat-Protection-1]: Exceeded string value length at line 3
रिज़ॉल्यूशन
अगर JSONThreatProtection नीति का मकसद, किसी स्ट्रिंग की तय लंबाई से ज़्यादा वैल्यू वाले पेलोड से सुरक्षा करना था, तो गड़बड़ी का मैसेज दिखेगा. इस मामले में, आपको कुछ और करने की ज़रूरत नहीं है.
हालांकि, अगर आपको लगता है कि पेलोड में लंबी वैल्यू दी जा सकती है, तो अपनी ज़रूरतों के हिसाब से <StringValueLength> में बदलाव करें.
उदाहरण के लिए, अगर आपको लगता है कि 90 वर्णों तक की वैल्यू इस्तेमाल की जा सकती है, तो नीति में इस तरह बदलाव करें:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>5</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>20</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>90</StringValueLength>
</JSONThreatProtection>
मान्य JSON ऑब्जेक्ट नहीं है
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Execution failed. reason: string: at line line-num", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Execution failed. reason: Expecting : at line 3",
"detail": {
"errorcode": "steps.jsonthreatprotection.ExecutionFailed"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब JSONThreatProtection नीति में <Source> एलिमेंट के ज़रिए तय किया गया इनपुट मैसेज पेलोड, मान्य JSON ऑब्जेक्ट नहीं होता.
संक्रमण की जांच
गड़बड़ी के मैसेज की जांच करें. इससे आपको नीति के नाम और उस लाइन नंबर का पता चलेगा जहां गड़बड़ी हुई है. यहां दिए गए उदाहरण में, नीति का नाम
JSON-Threat-Protection-1 andलाइन में पेलोड2है.JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: Expecting : at line 3इनपुट पेलोड के उस लाइन नंबर की जांच करें जिसे पहले चरण में पहचाना गया था. साथ ही, यह देखें कि पेलोड में पास किया गया JSON ऑब्जेक्ट, वाकई में एक मान्य JSON ऑब्जेक्ट है या नहीं.
यहां इनपुट पेलोड का एक उदाहरण दिया गया है:
{ "Longitude": 6.11499, "Latitude" 50.76891 }ऊपर दिखाए गए JSON पेलोड में, तीसरी लाइन में
":"(कोलन) नहीं है. यह मान्य JSON ऑब्जेक्ट नहीं है. इसलिए, आपको यह गड़बड़ी दिखेगी:JSONThreatProtection[JSON-Threat-Protection-1]: Execution failed. reason: Expecting : at line 3
रिज़ॉल्यूशन
पक्का करें कि JSONThreatProtection नीति को शामिल करने वाली किसी भी एपीआई प्रॉक्सी को मान्य इनपुट JSON पेलोड पास किया गया हो.
ऊपर दिए गए उदाहरण के लिए, JSON पेलोड में इस तरह बदलाव करें:
{
"Longitude": 6.11499,
"Latitude" : 50.76891
}
SourceUnavailable
गड़बड़ी कोड
steps.jsonthreatprotection.SourceUnavailable
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]:: Source[var_name] is not available" "detail": { "errorcode": "steps.jsonthreatprotection.SourceUnavailable" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]::
Source requests is not available",
"detail": {
"errorcode": "steps.jsonthreatprotection.SourceUnavailable"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब JSONThreatProtection नीति के <Source> एलिमेंट में तय किया गया message वैरिएबल इनमें से कोई एक हो:
- स्कोप से बाहर है (उस फ़्लो में उपलब्ध नहीं है जहां नीति लागू की जा रही है)
request,responseयाmessageमें से कोई मान्य वैल्यू नहीं है
उदाहरण के लिए, यह गड़बड़ी तब होती है, जब नीति में मौजूद <Source> एलिमेंट को ऐसे वैरिएबल पर सेट किया जाता है जो उस फ़्लो में मौजूद नहीं है जहां नीति लागू की जाती है.
संक्रमण की जांच
गड़बड़ी के मैसेज से, नीति का नाम और सोर्स वैरिएबल का नाम पता करें. उदाहरण के लिए, इस गड़बड़ी के मैसेज में नीति का नाम
JSON-Threat-Protection-1है और सोर्स वैरिएबलrequestsहै:JSONThreatProtection[JSON-Threat-Protection-1]:: Source requests is not availableपहले चरण में पहचाने गए
<Source>एलिमेंट के लिए दी गई वैल्यू की जांच करें.JSONThreatProtection नीति के इस उदाहरण में,
<Source>एलिमेंट कोrequestsपर सेट किया गया है.<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>5</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>20</ObjectEntryNameLength> <Source>requests</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection><Source>एलिमेंट के लिए मान्य वैल्यूrequest,responseयाmessageहैं. क्योंकि requests एक मान्य वैल्यू नहीं है और यह उस फ़्लो में मौजूद नहीं है जहां नीति लागू की जा रही है, इसलिए आपको यह गड़बड़ी दिखेगी:JSONThreatProtection[JSON-Threat-Protection-1]:: Source requests is not available
रिज़ॉल्यूशन
पक्का करें कि JSONThreatProtection की उल्लंघन करने वाली नीति के <Source> एलिमेंट में सेट किया गया वैरिएबल, request, response या message पर सेट हो. साथ ही, यह उस फ़्लो में मौजूद हो जहां नीति लागू होती है.
ऊपर दिखाई गई JSONThreatProtection नीति के उदाहरण को ठीक करने के लिए, <Source> एलिमेंट में बदलाव करके request वैरिएबल का इस्तेमाल किया जा सकता है. ऐसा इसलिए, क्योंकि यह अनुरोध फ़्लो में मौजूद है:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>5</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>20</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>
NonMessageVariable
गड़बड़ी कोड
steps.jsonthreatprotection.NonMessageVariable
गड़बड़ी के जवाब का मुख्य हिस्सा
{ "fault": { "faultstring": "JSONThreatProtection[policy_name]: Variable var_name does not resolve to a Message" "detail": { "errorcode": "steps.jsonthreatprotection.NonMessageVariable" } } }
गड़बड़ी वाले जवाब के मुख्य हिस्से का उदाहरण
{
"fault": {
"faultstring": "JSONThreatProtection[JSON-Threat-Protection-1]:
Variable message.content does not resolve to a Message",
"detail": {
"errorcode": "steps.jsonthreatprotection.NonMessageVariable"
}
}
}
वजह
यह गड़बड़ी तब होती है, जब JSONThreatProtection नीति में <Source> एलिमेंट को ऐसे वैरिएबल पर सेट किया जाता है जो message टाइप का नहीं है.
मैसेज टाइप वैरिएबल, पूरे एचटीटीपी अनुरोधों और जवाबों को दिखाते हैं. Apigee Edge में पहले से मौजूद फ़्लो वैरिएबल request, response, और message, मैसेज टाइप के होते हैं. मैसेज वैरिएबल के बारे में ज़्यादा जानने के लिए, वैरिएबल का रेफ़रंस देखें.
संक्रमण की जांच
गड़बड़ी के मैसेज से, JSONThreatProtection नीति का नाम और सोर्स वैरिएबल का नाम पता करें. उदाहरण के लिए, इस गड़बड़ी के मैसेज में नीति का नाम
JSON-Threat-Protection-1है और सोर्स वैरिएबलmessage.contentहै:JSONThreatProtection[JSON-Threat-Protection-1]: Variable message.content does not resolve to a MessageJSONThreatProtection नीति के
<Source>एलिमेंट की जांच करें. इस एलिमेंट की पहचान पहले चरण में की गई थी.JSONThreatProtection नीति के इस उदाहरण में,
<Source>कोmessageके बजायmessage.contentपर सेट किया गया है:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSON Threat Protection-1</DisplayName> <Properties/> <ArrayElementCount>3</ArrayElementCount> <ContainerDepth>5</ContainerDepth> <ObjectEntryCount>5</ObjectEntryCount> <ObjectEntryNameLength>20</ObjectEntryNameLength> <Source>message.content</Source> <StringValueLength>50</StringValueLength> </JSONThreatProtection>message.content, मैसेज टाइप का नहीं है. इसलिए, आपको यह गड़बड़ी का मैसेज मिलता है:JSONThreatProtection[JSON-Threat-Protection-1]: Variable message.content does not resolve to a Message
रिज़ॉल्यूशन
पक्का करें कि JSONThreatProtection की जिस नीति का पालन नहीं किया गया है उसके <Source> एलिमेंट को, message टाइप के ऐसे फ़्लो वैरिएबल पर सेट किया गया हो जो उस फ़्लो में मौजूद हो जहां नीति लागू होती है.
नीति को ठीक करने के लिए, <Source> एलिमेंट में बदलाव करके, मैसेज टाइप वाला वैरिएबल तय किया जा सकता है. उदाहरण के लिए, JSONThreatProtection की जांच में फ़ेल होने पर, <Source> एलिमेंट को message के तौर पर सेट किया जा सकता है:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
<DisplayName>JSON Threat Protection-1</DisplayName>
<Properties/>
<ArrayElementCount>3</ArrayElementCount>
<ContainerDepth>5</ContainerDepth>
<ObjectEntryCount>5</ObjectEntryCount>
<ObjectEntryNameLength>20</ObjectEntryNameLength>
<Source>message</Source>
<StringValueLength>50</StringValueLength>
</JSONThreatProtection>