คุณกําลังดูเอกสารประกอบของ Apigee Edge
ไปที่เอกสารประกอบของ Apigee X info
นโยบายการควบคุมการเข้าถึง
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
accesscontrol.IPDeniedAccess |
403 | มีการส่งผ่านที่อยู่ IP ของไคลเอ็นต์หรือที่อยู่ IP
ในคำขอ API ตรงกับที่อยู่ IP ที่ระบุในองค์ประกอบ <SourceAddress> ภายใน
องค์ประกอบ <MatchRule> ของนโยบายควบคุมการเข้าถึง และแอตทริบิวต์ action ของ
องค์ประกอบ <MatchRule> ได้รับการตั้งค่าเป็น DENY |
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ ดูข้อมูลเพิ่มเติมได้ที่ตัวแปรเฉพาะสําหรับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "IPDeniedAccess" |
acl.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | acl.AC-AllowAccess.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "faultstring":"Access Denied for client ip : 52.211.243.3" "detail":{ "errorcode":"accesscontrol.IPDeniedAccess" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="IPDeniedAccess"> <Step> <Name>AM-IPDeniedAccess</Name> <Condition>(fault.name Matches "IPDeniedAccess") </Condition> </Step> <Condition>(acl.failed = true) </Condition> </FaultRule>
นโยบาย AccessEntity
ดูข้อมูลที่เกี่ยวข้องได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ไม่มี
ข้อผิดพลาดในการทำให้ใช้งานได้
ชื่อข้อผิดพลาด | สตริงข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|---|
InvalidEntityType |
Invalid type [entity_type] in ACCESSENTITYStepDefinition
[policy_name] |
ไม่มีข้อมูล | ประเภทเอนทิตีที่ใช้ต้องเป็นประเภทที่รองรับ |
นโยบาย AssignMessage
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.assignmessage.SetVariableFailed |
500 | The policy was not able to set a variable. See the fault string for the name of the unresolved variable. | |
steps.assignmessage.VariableOfNonMsgType |
500 |
This error occurs if the Message type variables represent entire HTTP requests and responses. The built-in Edge
flow variables |
build |
steps.assignmessage.UnresolvedVariable |
500 |
This error occurs if a variable specified in the Assign Message policy is either:
|
build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidIndex |
If the index specified in the <Copy> and/or <Remove> elements of the Assign Message
policy is 0 or a negative number, then deployment of the API Proxy fails.
|
build |
InvalidVariableName |
If the child element <Name> is empty or not specified in the <AssignVariable> element,
then the deployment of the API proxy fails because there is no valid variable name to
which to assign a value. A valid variable name is required.
|
build |
InvalidPayload |
A payload specified in the policy is invalid. |
Fault variables
These variables are set when this policy triggers an error at runtime. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "UnresolvedVariable" |
assignmessage.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | assignmessage.AM-SetResponse.failed = true |
Example error response
{ "fault":{ "detail":{ "errorcode":"steps.assignmessage.VariableOfNonMsgType" }, "faultstring":"AssignMessage[AM-SetResponse]: value of variable is not of type Message" } }
Example fault rule
<FaultRule name="Assign Message Faults"> <Step> <Name>AM-CustomNonMessageTypeErrorResponse</Name> <Condition>(fault.name Matches "VariableOfNonMsgType") </Condition> </Step> <Step> <Name>AM-CustomSetVariableErrorResponse</Name> <Condition>(fault.name = "SetVariableFailed")</Condition> </Step> <Condition>(assignmessage.failed = true) </Condition> </FaultRule>
นโยบาย BasicAuthentication
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle errors. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.basicauthentication.InvalidBasicAuthenticationSource |
500 | On a decode when the incoming Base64 encoded string does not contain a valid value or the header is malformed (e.g., does not start with "Basic"). | build |
steps.basicauthentication.UnresolvedVariable |
500 | The required source variables for the decode or encode are not present. This error can
only occur if IgnoreUnresolvedVariables is false. |
build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when | Fix |
---|---|---|
UserNameRequired |
The <User> element must be present for the named operation. |
build |
PasswordRequired |
The <Password> element must be present for the named operation. |
build |
AssignToRequired |
The <AssignTo> element must be present for the named operation. |
build |
SourceRequired |
The <Source> element must be present for the named operation. |
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "UnresolvedVariable" |
BasicAuthentication.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | BasicAuthentication.BA-Authenticate.failed = true |
Example error response
{ "fault":{ "detail":{ "errorcode":"steps.basicauthentication.UnresolvedVariable" }, "faultstring":"Unresolved variable : request.queryparam.password" } }
Example fault rule
<FaultRule name="Basic Authentication Faults"> <Step> <Name>AM-UnresolvedVariable</Name> <Condition>(fault.name Matches "UnresolvedVariable") </Condition> </Step> <Step> <Name>AM-AuthFailedResponse</Name> <Condition>(fault.name = "InvalidBasicAuthenticationSource")</Condition> </Step> <Condition>(BasicAuthentication.BA-Authentication.failed = true) </Condition> </FaultRule>
นโยบาย ConcurrentRateLimit
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการข้อผิดพลาดได้ หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|
policies.concurrentratelimit.ConcurrentRatelimtViolation |
503 |
มีการเชื่อมต่อเกินขีดจำกัดแล้ว ขีดจำกัดการเชื่อมต่อ : {0} หมายเหตุ: รหัสข้อผิดพลาดที่แสดงทางด้านซ้ายเป็นข้อมูลที่ถูกต้อง แม้ว่า มีการสะกดคำผิด ("limt") ตรวจสอบให้แน่ใจว่าใช้โค้ดตรงตามที่แสดงไว้ที่นี่ เมื่อสร้างกฎข้อผิดพลาดเพื่อดักจับข้อผิดพลาดนี้ |
ข้อผิดพลาดในการทำให้ใช้งานได้
ชื่อข้อผิดพลาด | เกิดขึ้นเมื่อ |
---|---|
InvalidCountValue |
ระบุค่าการนับพร้อมกันที่ไม่ถูกต้อง |
ConcurrentRatelimitStepAttachment\ |
ไม่อนุญาตให้แนบไฟล์นโยบายอัตราขีดจำกัดพร้อมกัน {0} ที่พร็อกซี เส้นทางคำขอ/การตอบกลับ/ข้อผิดพลาด ต้องวางนโยบายนี้ในปลายทางเป้าหมาย |
ConcurrentRatelimitStepAttachment\ |
ไม่มีไฟล์แนบของนโยบาย Ratelimit พร้อมกัน {0} ที่คำขอ/การตอบกลับ/ความผิดพลาดเป้าหมาย เส้นทาง นโยบายนี้ต้องวางไว้ในส่วนโฟลว์คำขอล่วงหน้าเป้าหมาย, โฟลว์การตอบกลับเป้าหมาย และ DefaultFaultRule |
InvalidTTLForMessageTimeOut |
ระบุค่า ttl ที่อัตราพร้อมกันไม่ถูกต้องสำหรับระยะหมดเวลาของข้อความ ต้องเป็น จำนวนเต็มบวก |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาด โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "ConcurrentRatelimtViolation"
หมายเหตุ: รหัสข้อผิดพลาดที่แสดงในตัวอย่างถูกต้อง แม้ว่าจะ มีการสะกดคำผิด ("limt") โปรดตรวจสอบว่าคุณใช้โค้ดตรงตามที่แสดงไว้ที่นี่ทุกประการ เมื่อสร้างกฎข้อผิดพลาดเพื่อดักจับข้อผิดพลาดนี้ |
concurrentratelimit.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | concurrentratelimit.CRL-RateLimitPolicy.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
หากเกินขีดจำกัดของอัตรา นโยบายจะแสดงผลเฉพาะสถานะ HTTP 503 แก่ไคลเอ็นต์
ตัวอย่างกฎข้อผิดพลาด
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRules> <FaultRule name="Quota Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "ConcurrentRatelimtViolation") </Condition> </Step> <Condition>concurrentratelimit.CRL-RateLimitPolicy.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย DecodeJWS
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|
steps.jws.FailedToDecode |
401 | นโยบายนี้ถอดรหัส JWS ไม่ได้ JWS อาจเสียหาย |
steps.jws.FailedToResolveVariable |
401 | เกิดขึ้นเมื่อไม่มีตัวแปรโฟลว์ที่ระบุในองค์ประกอบ <Source> ของนโยบายอยู่ |
steps.jws.InvalidClaim |
401 | สำหรับการอ้างสิทธิ์ที่ขาดหายไปหรือการอ้างสิทธิ์ไม่ตรงกัน หรือส่วนหัวที่ขาดหายไปหรือส่วนหัวไม่ตรงกัน |
steps.jws.InvalidJsonFormat |
401 | พบ JSON ที่ไม่ถูกต้องในส่วนหัว JWS |
steps.jws.InvalidJws |
401 | ข้อผิดพลาดนี้เกิดขึ้นเมื่อการยืนยันลายเซ็น JWS ล้มเหลว |
steps.jws.InvalidPayload |
401 | เพย์โหลด JWS ไม่ถูกต้อง |
steps.jws.InvalidSignature |
401 | ละเว้น <DetachedContent> และ JWS มีเพย์โหลดเนื้อหาที่ถูกแยกออก |
steps.jws.MissingPayload |
401 | ไม่มีเพย์โหลด JWS |
steps.jws.NoAlgorithmFoundInHeader |
401 | เกิดขึ้นเมื่อ JWS ข้ามส่วนหัวของอัลกอริทึม |
steps.jws.UnknownException |
401 | เกิดข้อผิดพลาดที่ไม่ทราบสาเหตุ |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | เกิดขึ้นเมื่อ |
---|---|
InvalidAlgorithm |
ค่าที่ใช้ได้มีเพียง RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512 |
|
ข้อผิดพลาดอื่นๆ เกี่ยวกับการทำให้ใช้งานได้ที่เป็นไปได้ |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWS.failed |
นโยบาย JWS ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | jws.JWS-Policy.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWS Policy Er>rors"<; > Step < > NameJa<vaScr>ipt-1/Name < > Condition(fault.name Matches "<;TokenExpi>red"<)/Con>dition < /St>ep Cond<itionJWS.f>ailed<=true/Cond>i<tion /F>aultRule /FaultRules
นโยบาย DecodeJWT
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.jwt.FailedToDecode |
401 | Occurs when the policy is unable to decode the JWT. The JWT may be malformed, invalid or otherwise not decodable. | build |
steps.jwt.FailedToResolveVariable |
401 | Occurs when the flow variable specified in the <Source> element of
the policy does not exist. |
|
steps.jwt.InvalidToken |
401 | Occurs when the flow variable specified in the <Source> element of
the policy is out of scope or can't be resolved. |
build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidEmptyElement |
Occurs when the flow variable containing the JWT to be decoded is not specified in the
<Source> element of the policy.
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWT.failed |
นโยบาย JWT ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | JWT.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย ExtractVariables
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.extractvariables.ExecutionFailed |
500 |
ข้อผิดพลาดนี้เกิดขึ้นเมื่อ
|
build |
steps.extractvariables.ImmutableVariable |
500 | ตัวแปรที่ใช้ในนโยบายจะเปลี่ยนแปลงไม่ได้ นโยบายไม่สามารถตั้งค่านี้ได้ ตัวแปร | |
steps.extractvariables.InvalidJSONPath |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากใช้เส้นทาง JSON ที่ไม่ถูกต้องในองค์ประกอบ JSONPath ของ
เช่น หากเพย์โหลด JSON ไม่มีออบเจ็กต์ Name
แต่คุณระบุ Name เป็นเส้นทางในนโยบาย ข้อผิดพลาดนี้จะเกิดขึ้น |
build |
steps.extractvariables.JsonPathParsingFailure |
500 | ข้อผิดพลาดนี้เกิดขึ้นเมื่อนโยบายไม่สามารถแยกวิเคราะห์เส้นทาง JSON และ
แยกข้อมูลจากตัวแปรโฟลว์ที่ระบุไว้ในองค์ประกอบ Source ปกติเป็นแบบนี้
จะเกิดขึ้นหากตัวแปรโฟลว์ที่ระบุในองค์ประกอบ Source ไม่อยู่ในองค์ประกอบปัจจุบัน
|
build |
steps.extractvariables.SetVariableFailed |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากนโยบายไม่สามารถกำหนดค่าให้กับตัวแปรได้ ข้อผิดพลาดมักจะเกิดขึ้นหากคุณพยายามกำหนดค่าให้กับตัวแปรหลายตัวที่มีชื่อเริ่มต้น ที่มีคำเดียวกันในรูปแบบที่คั่นด้วยจุดที่ซ้อนกัน | build |
steps.extractvariables.SourceMessageNotAvailable |
500 | ข้อผิดพลาดนี้จะเกิดขึ้นหากข้อความ
ตัวแปรที่ระบุในองค์ประกอบ Source ของนโยบาย
เป็นอย่างใดอย่างหนึ่งต่อไปนี้
|
build |
steps.extractvariables.UnableToCast |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากนโยบายไม่สามารถแคสต์ไฟล์ที่ดึงข้อมูลมาได้ ให้กับตัวแปร โดยปกติ กรณีนี้จะเกิดขึ้นหากคุณพยายามตั้งค่า ข้อมูลประเภทหนึ่งกับตัวแปรของประเภทข้อมูลอื่น | build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
NothingToExtract |
หากนโยบายไม่มีองค์ประกอบ URIPath , QueryParam ,
Header , FormParam , XMLPayload หรือ JSONPayload
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว เพราะไม่มีข้อมูลให้ดึงข้อมูล |
build |
NONEmptyPrefixMappedToEmptyURI |
ข้อผิดพลาดนี้จะเกิดขึ้นหากนโยบายมีการกำหนดคำนำหน้าไว้ใน
Namespace องค์ประกอบภายใต้องค์ประกอบ XMLPayload แต่ไม่มี URI ที่
กำหนดไว้ |
build |
DuplicatePrefix |
ข้อผิดพลาดนี้เกิดขึ้นหากนโยบายมีคำนำหน้าเหมือนกันมากกว่า
1 ครั้งในองค์ประกอบ Namespace ใต้องค์ประกอบ XMLPayload |
build |
NoXPathsToEvaluate |
หากนโยบายไม่มีองค์ประกอบ XPath ภายใน
XMLPayload การทำให้พร็อกซี API ใช้งานได้ล้มเหลวเนื่องจากข้อผิดพลาดนี้
|
build |
EmptyXPathExpression |
หากนโยบายมีนิพจน์ XPath ที่ว่างเปล่าภายใน XMLPayload
การทำให้พร็อกซี API ใช้งานได้จะล้มเหลว |
build |
NoJSONPathsToEvaluate |
หากนโยบายไม่มีองค์ประกอบ JSONPath ภายใน
JSONPayload การทำให้พร็อกซี API ใช้งานได้ล้มเหลวเนื่องจากข้อผิดพลาดนี้ |
build |
EmptyJSONPathExpression |
หากนโยบายมีนิพจน์ XPath ที่ว่างเปล่าภายใน
XMLPayload การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลว |
build |
MissingName |
หากนโยบายไม่มีแอตทริบิวต์ name ในนโยบาย
องค์ประกอบอย่างเช่น QueryParam , Header , FormParam หรือ
Variable หากจำเป็นต้องใช้ การทำให้พร็อกซี API ใช้งานได้จะล้มเหลว |
build |
PatternWithoutVariable |
หากนโยบายไม่ได้ระบุตัวแปรภายในองค์ประกอบ Pattern
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว องค์ประกอบ Pattern ต้องมีชื่อ
ตัวแปรที่จะจัดเก็บข้อมูลที่แยกออกมา |
build |
CannotBeConvertedToNodeset |
หากนโยบายมีนิพจน์ XPath โดยที่ประเภท Variable
คือnodeset
แต่แปลงนิพจน์เป็น Nodeset ไม่ได้ ซึ่งทำให้การทำให้พร็อกซี API ใช้งานได้ล้มเหลว |
build |
JSONPathCompilationFailed |
นโยบายไม่สามารถคอมไพล์เส้นทาง JSON ที่ระบุ | |
InstantiationFailed |
สร้างอินสแตนซ์นโยบายไม่ได้ | |
XPathCompilationFailed |
หากคำนำหน้าหรือค่าที่ใช้ในองค์ประกอบ XPath ไม่ได้เป็นส่วนหนึ่งของ
เนมสเปซที่ประกาศไว้ในนโยบาย จากนั้นการติดตั้งใช้งานพร็อกซี API
ล้มเหลว |
build |
InvalidPattern |
หากคําจํากัดความองค์ประกอบ Pattern ไม่ถูกต้องในองค์ประกอบใดก็ตาม เช่น URIPath
QueryParam Header FormParam XMLPayload
หรือ JSONPayload ภายในนโยบาย
แล้วการติดตั้งใช้งาน
พร็อกซี API ล้มเหลว
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาดขณะรันไทม์ สำหรับข้อมูลเพิ่มเติม ดูสิ่งที่คุณ ที่ต้องทราบเกี่ยวกับข้อผิดพลาดด้านนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name = "SourceMessageNotAvailable" |
extractvariables.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | extractvariables.EV-ParseJsonResponse.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "detail":{ "errorcode":"steps.extractvariables.SourceMessageNotAvailable" }, "faultstring":"request message is not available for ExtractVariable: EV-ParseJsonResponse" } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="Extract Variable Faults"> <Step> <Name>AM-CustomErrorMessage</Name> <Condition>(fault.name = "SourceMessageNotAvailable") </Condition> </Step> <Condition>(extractvariables.EM-ParseJsonResponse.failed = true) </Condition> </FaultRule>
นโยบาย GenerateJWS
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jws.GenerationFailed |
401 | The policy was unable to generate the JWS. |
steps.jws.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm |
steps.jws.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jws.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jws.InvalidJsonFormat |
401 | Invalid JSON found in the JWS header. |
steps.jws.InvalidPayload |
401 | The JWS payload is invalid. |
steps.jws.InvalidSignature |
401 | <DetachedContent> is omitted and the JWS has a detached content payload. |
steps.jws.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWS does not
include a kid property in the header. |
steps.jws.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jws.MissingPayload |
401 | The JWS payload is missing. |
steps.jws.NoAlgorithmFoundInHeader |
401 | Occurs when the JWS omits the algorithm header. |
steps.jws.SigningFailed |
401 | In GenerateJWS, for a key less than the minimum size for the HS384 or HS512 algorithms |
steps.jws.UnknownException |
401 | An unknown exception occurred. |
steps.jws.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when |
---|---|
InvalidAlgorithm |
The only valid values are: RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512. |
|
Other possible deployment errors. |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWS.failed |
นโยบาย JWS ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | jws.JWS-Policy.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWS Policy Er>rors"<; > Step < > NameJa<vaScr>ipt-1/Name < > Condition(fault.name Matches "<;TokenExpi>red"<)/Con>dition < /St>ep Cond<itionJWS.f>ailed<=true/Cond>i<tion /F>aultRule /FaultRules
นโยบาย GenerateJWT
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|
steps.jwt.AlgorithmInTokenNotPresentInConfiguration |
401 | เกิดขึ้นเมื่อนโยบายการยืนยันมีอัลกอริทึมหลายรายการ |
steps.jwt.AlgorithmMismatch |
401 | อัลกอริทึมที่ระบุในนโยบายการสร้างไม่ตรงกับอัลกอริทึมในนโยบาย "ยืนยัน" อัลกอริทึมที่ระบุต้องตรงกัน |
steps.jwt.FailedToDecode |
401 | นโยบายนี้ถอดรหัส JWT ไม่ได้ JWT อาจเสียหาย |
steps.jwt.GenerationFailed |
401 | นโยบายสร้าง JWT ไม่ได้ |
steps.jwt.InsufficientKeyLength |
401 | สำหรับคีย์ที่มีขนาดเล็กกว่า 32 ไบต์สำหรับอัลกอริทึม HS256 ขนาดน้อยกว่า 48 ไบต์สำหรับอัลกอริทึม HS386 และน้อยกว่า 64 ไบต์สำหรับอัลกอริทึม HS512 |
steps.jwt.InvalidClaim |
401 | สำหรับการอ้างสิทธิ์ที่ขาดหายไปหรือการอ้างสิทธิ์ไม่ตรงกัน หรือส่วนหัวที่ขาดหายไปหรือส่วนหัวไม่ตรงกัน |
steps.jwt.InvalidCurve |
401 | เส้นโค้งที่คีย์ระบุไม่ถูกต้องสำหรับอัลกอริทึม Elliptic Curve |
steps.jwt.InvalidJsonFormat |
401 | พบ JSON ที่ไม่ถูกต้องในส่วนหัวหรือเพย์โหลด |
steps.jwt.InvalidToken |
401 | ข้อผิดพลาดนี้เกิดขึ้นเมื่อการยืนยันลายเซ็น JWT ล้มเหลว |
steps.jwt.JwtAudienceMismatch |
401 | การอ้างสิทธิ์กลุ่มเป้าหมายล้มเหลวในการยืนยันโทเค็น |
steps.jwt.JwtIssuerMismatch |
401 | การอ้างสิทธิ์ของผู้ออกบัตรล้มเหลวในการยืนยันโทเค็น |
steps.jwt.JwtSubjectMismatch |
401 | เรื่องการอ้างสิทธิ์ล้มเหลวในการยืนยันโทเค็น |
steps.jwt.KeyIdMissing |
401 | นโยบาย "ยืนยัน" ใช้ JWKS เป็นแหล่งที่มาสำหรับคีย์สาธารณะ แต่ JWT ที่ลงนามไม่มีพร็อพเพอร์ตี้ kid ในส่วนหัว |
steps.jwt.KeyParsingFailed |
401 | ไม่สามารถแยกวิเคราะห์คีย์สาธารณะจากข้อมูลคีย์ที่ระบุ |
steps.jwt.NoAlgorithmFoundInHeader |
401 | เกิดขึ้นเมื่อ JWT ไม่มีส่วนหัวอัลกอริทึม |
steps.jwt.NoMatchingPublicKey |
401 | นโยบายยืนยันใช้ JWKS เป็นแหล่งที่มาสำหรับคีย์สาธารณะ แต่ kid ใน JWT ที่ลงนามแล้วไม่ได้แสดงอยู่ใน JWKS |
steps.jwt.SigningFailed |
401 | ใน GenerateJWT สำหรับคีย์ที่มีขนาดเล็กกว่าขนาดต่ำสุดสำหรับอัลกอริทึม HS384 หรือ HS512 |
steps.jwt.TokenExpired |
401 | นโยบายจะพยายามยืนยันโทเค็นที่หมดอายุ |
steps.jwt.TokenNotYetValid |
401 | โทเค็นยังไม่ถูกต้อง |
steps.jwt.UnhandledCriticalHeader |
401 | ส่วนหัวที่พบในนโยบาย "ยืนยัน JWT" ในส่วนหัว crit จะไม่ปรากฏใน KnownHeaders |
steps.jwt.UnknownException |
401 | เกิดข้อผิดพลาดที่ไม่ทราบสาเหตุ |
steps.jwt.WrongKeyType |
401 | ประเภทคีย์ที่ระบุไม่ถูกต้อง เช่น หากคุณระบุคีย์ RSA สำหรับอัลกอริทึม Elliptic Curve หรือคีย์เส้นโค้งสำหรับอัลกอริทึม RSA |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidNameForAdditionalClaim |
การทำให้ใช้งานได้จะล้มเหลวหากการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> มีชื่อที่จดทะเบียนอย่างใดอย่างหนึ่งต่อไปนี้ kid , iss , sub , aud , iat , exp , nbf หรือ jti
|
build |
InvalidTypeForAdditionalClaim |
หากการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ใช่ประเภท string , number , boolean หรือ map การทำให้ใช้งานได้จะล้มเหลว
|
build |
MissingNameForAdditionalClaim |
หากไม่ได้ระบุชื่อการอ้างสิทธิ์ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidNameForAdditionalHeader |
ข้อผิดพลาดนี้จะเกิดขึ้นเมื่อชื่อของการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> เป็น alg หรือ typ
|
build |
InvalidTypeForAdditionalHeader |
หากประเภทของการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ใช่ประเภท string , number , boolean หรือ map การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidValueOfArrayAttribute |
ข้อผิดพลาดนี้เกิดขึ้นเมื่อค่าของแอตทริบิวต์อาร์เรย์ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ได้ตั้งค่าเป็น true หรือ false
|
build |
InvalidConfigurationForActionAndAlgorithm |
หากใช้องค์ประกอบ <PrivateKey> กับอัลกอริทึม HS Family หรือมีการใช้องค์ประกอบ <SecretKey> กับอัลกอริทึม Family ของ RSA การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidValueForElement |
หากค่าที่ระบุในองค์ประกอบ <Algorithm> ไม่ใช่ค่าที่รองรับ การทำให้ใช้งานได้จะล้มเหลว
|
build |
MissingConfigurationElement |
ข้อผิดพลาดนี้จะเกิดขึ้นหากไม่ได้ใช้องค์ประกอบ <PrivateKey> กับอัลกอริทึมตระกูล RSA หรือไม่ได้ใช้องค์ประกอบ <SecretKey> กับอัลกอริทึมครอบครัว HS
|
build |
InvalidKeyConfiguration |
หากไม่ได้กำหนดองค์ประกอบย่อย <Value> ในองค์ประกอบ <PrivateKey> หรือ <SecretKey> การทำให้ใช้งานได้จะล้มเหลว
|
build |
EmptyElementForKeyConfiguration |
หากแอตทริบิวต์ ref ขององค์ประกอบย่อย <Value> ขององค์ประกอบ <PrivateKey> หรือ <SecretKey> ว่างเปล่าหรือไม่ได้ระบุ การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidVariableNameForSecret |
ข้อผิดพลาดนี้เกิดขึ้นหากชื่อตัวแปรโฟลว์ที่ระบุในแอตทริบิวต์ ref ขององค์ประกอบย่อย <Value> ขององค์ประกอบ <PrivateKey> หรือ <SecretKey> ไม่มีคำนำหน้าส่วนตัว (private.)
|
build |
InvalidSecretInConfig |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบย่อย <Value> ขององค์ประกอบ <PrivateKey> หรือ <SecretKey> ไม่มีคำนำหน้าส่วนตัว (private.)
|
build |
InvalidTimeFormat |
หากค่าที่ระบุในองค์ประกอบ <NotBefore> ไม่ได้ใช้รูปแบบที่รองรับ การทำให้ใช้งานได้จะล้มเหลว
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWT.failed |
นโยบาย JWT ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | JWT.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย JavaCallout
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.javacallout.ExecutionError |
500 | เกิดขึ้นเมื่อโค้ด Java ส่งข้อยกเว้นหรือแสดงผลเป็น Null ในระหว่างการบังคับใช้นโยบาย JavaScript | build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อมีการทำให้พร็อกซีที่มีนโยบายใช้งานได้
ชื่อข้อผิดพลาด | สตริงข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|---|
ResourceDoesNotExist |
Resource with name
[name] and type [type] does not exist |
ไม่มี | ไม่มีไฟล์ที่ระบุในองค์ประกอบ <ResourceURL> |
JavaCalloutInstantiationFailed |
Failed to instantiate the JavaCallout Class [classname] |
ไม่มี | ไฟล์คลาสที่ระบุในองค์ประกอบ <ClassName> ไม่ได้อยู่ใน
โหล |
IncompatibleJavaVersion |
Failed to load java class [classname] definition due to - [reason] |
ไม่มี | ดูสตริงข้อผิดพลาด ดูเพิ่มเติมที่รองรับ ซอฟต์แวร์และเวอร์ชันที่รองรับ |
JavaClassNotFoundInJavaResource |
Failed to find the ClassName in java resource [jar_name] -
[class_name] |
ไม่มี | ดูสตริงข้อผิดพลาด |
JavaClassDefinitionNotFound |
Failed to load java class [class_name] definition due to - [reason] |
ไม่มี | ดูสตริงข้อผิดพลาด |
NoAppropriateConstructor |
No appropriate constructor found in JavaCallout class [class_name] |
ไม่มี | ดูสตริงข้อผิดพลาด |
NoResourceForURL |
Could not locate a resource with URL [string] |
ไม่มี | ดูสตริงข้อผิดพลาด |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาด โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "ExecutionError" |
javacallout.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | javacallout.JC-GetUserData.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "faultstring":"Failed to execute JavaCallout. [policy_name]", "detail":{ "errorcode":"javacallout.ExecutionError" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="JavaCalloutFailed"> <Step> <Name>AM-JavaCalloutError</Name> </Step> <Condition>(fault.name Matches "ExecutionError") </Condition> </FaultRule>
นโยบาย JavaScript
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.javascript.ScriptExecutionFailed |
500 | The JavaScript policy can throw many different types of ScriptExecutionFailed errors. Commonly seen types of errors include RangeError, ReferenceError, SyntaxError, TypeError, and URIError. | build |
steps.javascript.ScriptExecutionFailedLineNumber |
500 | An error occurred in the JavaScript code. See the fault string for details. | N/A |
steps.javascript.ScriptSecurityError |
500 | A security error occurred when the JavaScript executed. See the fault string for details. | N/A |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidResourceUrlFormat |
If the format of the resource URL specified within the <ResourceURL> or the <IncludeURL> element of the JavaScript policy is invalid, then the deployment of the API proxy fails. |
build |
InvalidResourceUrlReference |
If the <ResourceURL> or the <IncludeURL> elements
refer to a JavaScript file that does not exist, then the deployment of the API proxy fails.
The referenced source file must exist either the API proxy, environment, or organization level. |
build |
WrongResourceType |
This error occurs during deployment if the <ResourceURL> or the <IncludeURL>
elements of the JavaScript policy refer to any resource type other than jsc (JavaScript file). |
build |
NoResourceURLOrSource |
The deployment of the JavaScript policy can fail with this error if the <ResourceURL>
element is not declared or if the resource URL is not defined within this element.
<ResourceURL> element is a mandatory element. Or, The <IncludeURL> element is declared
but the resource URL is not defined within this element. The <IncludeURL> element is optional
but if declared, the resource URL must be specified within the <IncludeURL> element. |
build |
Fault variables
These variables are set when this policy triggers an error at runtime. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "ScriptExecutionFailed" |
javascript.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | javascript.JavaScript-1.failed = true |
Example error response
{ "fault": { "faultstring": "Execution of SetResponse failed with error: Javascript runtime error: "ReferenceError: "status" is not defined. (setresponse.js:6)\"", "detail": { "errorcode": "steps.javascript.ScriptExecutionFailed" } } }
Example fault rule
<FaultRule name="JavaScript Policy Faults"> <Step> <Name>AM-CustomErrorResponse</Name> <Condition>(fault.name Matches "ScriptExecutionFailed") </Condition> </Step> <Condition>(javascript.JavaScript-1.failed = true) </Condition> </FaultRule>
นโยบาย JSONThreatProtection
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.jsonthreatprotection.ExecutionFailed |
500 | นโยบาย JSONThreatProtection สามารถแสดงข้อผิดพลาด ExecutionFailed หลายประเภท ข้อผิดพลาดเหล่านี้ส่วนใหญ่เกิดขึ้นเมื่อเกินเกณฑ์ที่กำหนดไว้ในนโยบาย เหล่านี้ ประเภทของข้อผิดพลาดมีดังนี้ ความยาวของชื่อรายการออบเจ็กต์ จำนวนรายการออบเจ็กต์ จำนวนองค์ประกอบของอาร์เรย์ ความลึกของคอนเทนเนอร์ ความยาวของค่าสตริงสตริง ข้อผิดพลาดนี้ยังเกิดขึ้นเมื่อเพย์โหลดมีออบเจ็กต์ JSON ที่ไม่ถูกต้อง | build |
steps.jsonthreatprotection.SourceUnavailable |
500 |
ข้อผิดพลาดนี้จะเกิดขึ้นหากข้อความ
ตัวแปรที่ระบุในองค์ประกอบ <Source> มีดังนี้
|
build |
steps.jsonthreatprotection.NonMessageVariable |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Source> ได้รับการตั้งค่าเป็นตัวแปรที่
ไม่ใช่ประเภท
message
|
build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ไม่มี
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาด โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "SourceUnavailable" |
jsonattack.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | jsonattack.JTP-SecureRequest.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "JSONThreatProtection[JPT-SecureRequest]: Execution failed. reason: JSONThreatProtection[JTP-SecureRequest]: Exceeded object entry name length at line 2", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="JSONThreatProtection Policy Fa>ults&<quot>;
Ste<p
> NameAM-CustomErr<orRes>ponse/Nam<e
> Condition(fault.name Matches "Exe<cutionFail>ed&qu<ot;) >/Cond<ition
> /Step
Condition(jsonattack.JPT-SecureReq<uest.faile>d< = true) />Condition
/FaultRule
ประเภทนโยบาย JSONThreatProtection จะกำหนดรหัสข้อผิดพลาดต่อไปนี้
นโยบาย JSONtoXML
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.jsontoxml.ExecutionFailed |
500 | The input payload (JSON) is empty or the input (JSON) passed to JSON to XML policy is invalid or malformed. | build |
steps.jsontoxml.InCompatibleTypes |
500 | This error occurs if the type of the variable defined in the <Source> element and
the <OutputVariable> element are not the same. It is mandatory that the type of the
variables contained within the <Source> element and the <OutputVariable> element
matches. The valid types are message and string . |
build |
steps.jsontoxml.InvalidSourceType |
500 | This error occurs if the type of the variable used to define the <Source> element
is invalid. The valid types of variable are message and string . |
build |
steps.jsontoxml.OutputVariableIsNotAvailable |
500 | This error occurs if the variable specified in the <Source> element of the JSON to
XML Policy is of type string and the <OutputVariable> element is not defined.
The <OutputVariable> element is mandatory when the variable defined in the <Source>
element is of type string. |
build |
steps.jsontoxml.SourceUnavailable |
500 |
This error occurs if the message
variable specified in the <Source> element of the JSON to XML policy is either:
|
build |
Deployment errors
None.
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "SourceUnavailable" |
jsontoxml.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | jsontoxml.JSON-to-XML-1.failed = true |
Example error response
{ "fault": { "faultstring": "JSONToXML[JSON-to-XML-1]: Source xyz is not available", "detail": { "errorcode": "steps.json2xml.SourceUnavailable" } } }
Example fault rule
<FaultRule name="JSON To XML Faults"> <Step> <Name>AM-SourceUnavailableMessage</Name> <Condition>(fault.name Matches "SourceUnavailable") </Condition> </Step> <Step> <Name>AM-BadJSON</Name> <Condition>(fault.name = "ExecutionFailed")</Condition> </Step> <Condition>(jsontoxml.JSON-to-XML-1.failed = true) </Condition> </FaultRule>
นโยบาย KeyValueMapOperations
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.keyvaluemapoperations.SetVariableFailed |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากคุณพยายามเรียกค่าจากแมปค่าคีย์ที่เข้ารหัส แล้วตั้งค่าเป็นตัวแปรที่มีชื่อไม่ได้ขึ้นต้นด้วย |
build |
steps.keyvaluemapoperations.UnsupportedOperationException |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากมีการตั้งค่าแอตทริบิวต์ |
build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidIndex |
หากแอตทริบิวต์ index ที่ระบุในองค์ประกอบ <Get> ของนโยบายการดำเนินการแมปค่าคีย์เป็น 0 หรือเป็นตัวเลขลบ จะทำให้การทำให้พร็อกซี API ใช้งานได้ไม่สำเร็จ ดัชนีจะเริ่มต้นจาก 1 ดังนั้นดัชนีที่เป็นจำนวนเต็ม 0 หรือจำนวนเต็มลบจึงถือว่าไม่ถูกต้อง
|
build |
KeyIsMissing |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Key> หายไปทั้งหมด หรือองค์ประกอบ <Parameter> หายไปภายในองค์ประกอบ <Key> ภายใต้องค์ประกอบ <Entry> ขององค์ประกอบ <InitialEntries> ของนโยบายการดำเนินการแมปค่าคีย์
|
build |
ValueIsMissing |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Value> หายไปใต้องค์ประกอบ <Entry> ขององค์ประกอบ <InitialEntries> ของนโยบายการดำเนินการแมปค่าคีย์ |
build |
นโยบาย LDAP
นโยบายนี้ใช้รหัสข้อผิดพลาดต่อไปนี้
รหัสข้อผิดพลาด | ข้อความ |
---|---|
InvalidAttributeName |
Invalid attribute name {0}. |
InvalidSearchBase |
Search base can not be empty. |
InvalidValueForPassword |
Invalid value for password field. It can not be empty. |
InvalidSearchScope |
Invalid scope {0}. Allowed scopes are {1}. |
InvalidUserCredentials |
Invalid user credentials. |
InvalidExternalLdapReference |
Invalid external ldap reference {0}. |
LdapResourceNotFound |
Ldap resource {0} not found. |
BaseDNRequired |
Base DN required. |
OnlyReferenceOrValueIsAllowed |
Only value or reference is allowed for {0}. |
AttributesRequired |
At least one attribute required for search action. |
UserNameIsNull |
User name is null. |
SearchQueryAndUserNameCannotBePresent |
Both search query and username can not be present in the authentication action.
Please specify either one of them. |
นโยบายการบันทึกข้อความ
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ |
---|---|---|
steps.messagelogging.StepDefinitionExecutionFailed |
500 | ดูสตริงข้อผิดพลาด |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidProtocol |
การติดตั้งใช้งานนโยบาย MessageLcking อาจล้มเหลวเนื่องจากข้อผิดพลาดนี้หากโปรโตคอล
ที่ระบุภายในองค์ประกอบ <Protocol> ไม่ถูกต้อง โปรโตคอลที่ถูกต้องคือ TCP และ UDP
สำหรับการส่งข้อความ syslog ผ่าน TLS/SSL จะสามารถสนับสนุนเฉพาะ TCP เท่านั้น |
build |
InvalidPort |
การทำให้ใช้งานได้ของนโยบาย MessageLนั้นๆ อาจล้มเหลวเนื่องจากข้อผิดพลาดนี้ หากหมายเลขพอร์ต
ไม่ได้ระบุภายในองค์ประกอบ <Port> หรือหากไม่ถูกต้อง หมายเลขพอร์ตต้องเป็น
จำนวนเต็มที่มากกว่า 0 |
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "StepDefinitionExecutionFailed" |
messagelogging.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | messagelogging.ML-LogMessages.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "detail":{ "errorcode":"steps.messagelogging.StepDefinitionExecutionFailed" }, "faultstring":"Execution failed" } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="MessageLogging"> <Step> <Name>ML-LogMessages</Name> <Condition>(fault.name Matches "StepDefinitionExecutionFailed") </Condition> </Step> <Condition>(messagelogging.ML-LogMessages.failed = true) </Condition> </FaultRule>
นโยบาย OASValidation
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | |
---|---|---|---|
steps.oasvalidation.Failed |
500 | ตรวจสอบเนื้อหาของคำขอกับข้อกําหนดของ OpenAPI ที่ระบุไม่ได้ | |
steps.oasvalidation.SourceMessageNotAvailable |
500 |
ตัวแปรที่ระบุในองค์ประกอบ |
|
steps.oasvalidation.NotMessageVariable |
500 |
องค์ประกอบ |
build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | |
---|---|---|
ResourceDoesNotExist |
ไม่มีข้อมูลจำเพาะของ OpenAPI ที่อ้างอิงในองค์ประกอบ <OASResource>
|
|
ResourceCompileFailed |
ข้อมูลจำเพาะของ OpenAPI ที่รวมอยู่ในการทำให้ใช้งานได้มีข้อผิดพลาดที่ทำให้ไม่สามารถคอมไพล์ได้ โดยทั่วไปเป็นการบ่งชี้ว่าข้อมูลจำเพาะไม่ใช่ OpenAPI Specification 3.0 ที่มีรูปแบบถูกต้อง | |
BadResourceURL |
ไม่สามารถประมวลผลข้อมูลจำเพาะของ OpenAPI ที่อ้างอิงในองค์ประกอบ <OASResource> ได้ ปัญหานี้อาจเกิดขึ้นหากไฟล์ไม่ใช่ไฟล์ JSON หรือ YAML หรือระบุ URL ของไฟล์ไม่ถูกต้อง
|
ตัวแปรของข้อผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาดขณะรันไทม์ ดูข้อมูลเพิ่มเติมเกี่ยวกับสิ่งที่คุณจำเป็นต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่แสดงในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของโค้ดข้อผิดพลาด | fault.name Matches "ResourceDoesNotExist" |
oasvalidation.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นข้อผิดพลาด | oasvalidation.myoaspolicy.failed = true |
นโยบาย PopulateCache
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|
policies.populatecache.EntryCannotBeCached |
500 | ระบบแคชรายการไม่ได้ ออบเจ็กต์ข้อความที่กำลังแคชไม่ใช่อินสแตนซ์ของ ที่ซีเรียลได้ |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidCacheResourceReference |
ข้อผิดพลาดนี้เกิดขึ้นหากมีการตั้งค่าองค์ประกอบ <CacheResource> ในนโยบาย PopulateCache เป็น
ชื่อที่ไม่มีอยู่ในสภาพแวดล้อมที่ทำให้พร็อกซี API ใช้งานได้ |
build |
CacheNotFound |
แคชที่ระบุในองค์ประกอบ <CacheResource> ไม่
ที่มีอยู่ |
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาด โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name = "EntryCannotBeCached" |
populatecache.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | populatecache.POP-CACHE-1.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "[entry] can not be cached. Only serializable entries are cached.", "detail": { "errorcode": "steps.populatecache.EntryCannotBeCached" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="Populate Cache Fault"> <Step> <Name>AM-EntryCannotBeCached</Name> <Condition>(fault.name Matches "EntryCannotBeCached") </Condition> </Step> <Condition>(populatecache.POP-CACHE-1.failed = true) </Condition> </FaultRule>
นโยบาย LookupCache
This section describes the error messages and flow variables that are set when this policy triggers an error. This information is important to know if you are developing fault rules for a proxy. To learn more, see What you need to know about policy errors and Handling faults.
Error code prefix
N/A
Runtime errors
This policy does not throw any runtime errors.
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidCacheResourceReference |
This error occurs if the <CacheResource> element is set to a
name which does not exist in the environment where the API proxy is being deployed. |
build |
InvalidTimeout |
If the <CacheLookupTimeoutInSeconds> element is set to
a negative number, then the deployment of the API proxy fails. |
build |
CacheNotFound |
This error occurs if the specific cache mentioned in the error message has not been created on a specific Message Processor component. | build |
Fault variables
N/A
Example error response
N/A
นโยบาย InvalidateCache
This section describes the error messages and flow variables that are set when this policy triggers an error. This information is important to know if you are developing fault rules for a proxy. To learn more, see What you need to know about policy errors and Handling faults.
Error code prefix
N/A
Runtime errors
This policy does not throw any runtime errors.
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidCacheResourceReference |
This error occurs if the <CacheResource> element in the InvalidateCache policy is set
to a name that does not exist in the environment where the API proxy is being deployed. |
build |
CacheNotFound |
This error occurs if the specific cache mentioned in the error message has not been created on a specific Message Processor component. | build |
Fault variables
N/A
Example error response
N/A
นโยบาย ResponseCache
This section describes the error messages and flow variables that are set when this policy triggers an error. This information is important to know if you are developing fault rules for a proxy. To learn more, see What you need to know about policy errors and Handling faults.
Error code prefix
N/A
Runtime errors
This policy does not throw any runtime errors.
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidTimeout |
If the
<CacheLookupTimeoutInSeconds> element of the ResponseCache policy is set to a negative number,
then the deployment of the API proxy fails. |
build |
InvalidCacheResourceReference |
This error occurs if the <CacheResource> element in a ResponseCache policy is set to a
name that does not exist in the environment where the API proxy is being deployed. |
build |
ResponseCacheStepAttachmentNotAllowedReq |
This error occurs if the same ResponseCache policy is attached to multiple request paths within any flows of an API proxy. | build |
ResponseCacheStepAttachmentNotAllowedResp |
This error occurs if the same ResponseCache policy is attached to multiple response paths within any flows of an API proxy. | build |
InvalidMessagePatternForErrorCode |
This error occurs if either the <SkipCacheLookup> or the <SkipCachePopulation>
element in a ResponseCache policy contains an invalid condition. |
build |
CacheNotFound |
This error occurs if the specific cache mentioned in the error message has not been created on a specific Message Processor component. | build |
Fault variables
N/A
Example error response
N/A
นโยบาย OAuthV2
ส่วนนี้อธิบายรหัสข้อบกพร่องและข้อความแสดงข้อผิดพลาดที่แสดงผล รวมถึงตัวแปรข้อบกพร่องที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้สำคัญต่อผู้ที่กำลังพัฒนากฎข้อบกพร่องเพื่อจัดการข้อบกพร่อง ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดด้านนโยบายและการจัดการข้อบกพร่อง
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อบกพร่อง | สถานะ HTTP | สาเหตุ | โยนโดยการดำเนินการ |
---|---|---|---|
steps.oauth.v2.access_token_expired |
401 | โทเค็นการเข้าถึงหมดอายุแล้ว |
VerifyAccessToken |
steps.oauth.v2.access_token_not_approved |
401 | เพิกถอนโทเค็นการเข้าถึงแล้ว | VerifyAccessToken |
steps.oauth.v2.apiresource_doesnot_exist |
401 | ทรัพยากรที่ขอไม่มีผลิตภัณฑ์ API ที่เชื่อมโยงกับโทเค็นการเข้าถึง | VerifyAccessToken |
steps.oauth.v2.FailedToResolveAccessToken |
500 | นโยบายคาดว่าจะพบโทเค็นการเข้าถึงในตัวแปรที่ระบุไว้ในองค์ประกอบ <AccessToken> แต่ระบบไม่สามารถแก้ไขตัวแปรได้ |
GenerateAccessToken |
steps.oauth.v2.FailedToResolveAuthorizationCode |
500 | นโยบายคาดว่าจะพบรหัสการให้สิทธิ์ในตัวแปรที่ระบุไว้ในองค์ประกอบ <Code> แต่ระบบไม่สามารถแก้ไขตัวแปรได้ |
GenerateAuthorizationCode |
steps.oauth.v2.FailedToResolveClientId |
500 | นโยบายคาดว่าจะพบรหัสไคลเอ็นต์ในตัวแปรที่ระบุไว้ในองค์ประกอบ <ClientId> แต่ไม่สามารถแก้ไขตัวแปรได้ |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
steps.oauth.v2.FailedToResolveRefreshToken |
500 | นโยบายคาดว่าจะพบโทเค็นรีเฟรชในตัวแปรที่ระบุไว้ในองค์ประกอบ <RefreshToken> แต่ระบบไม่สามารถแก้ไขตัวแปรได้ |
RefreshAccessToken |
steps.oauth.v2.FailedToResolveToken |
500 | นโยบายคาดว่าจะพบโทเค็นในตัวแปรที่ระบุไว้ในองค์ประกอบ <Tokens> แต่ไม่สามารถแก้ไขตัวแปรได้ |
ValidateToken |
steps.oauth.v2.InsufficientScope |
403 | โทเค็นการเข้าถึงที่แสดงในคำขอมีขอบเขตไม่ตรงกับขอบเขตที่ระบุไว้ในนโยบายการยืนยันโทเค็นการเข้าถึง ดูข้อมูลเกี่ยวกับขอบเขตได้ที่การใช้ขอบเขต OAuth2 | VerifyAccessToken |
steps.oauth.v2.invalid_access_token |
401 | โทเค็นการเข้าถึงที่ส่งจากไคลเอ็นต์ไม่ถูกต้อง | VerifyAccessToken |
steps.oauth.v2.invalid_client |
401 |
ระบบจะแสดงชื่อข้อผิดพลาดนี้เมื่อตั้งค่าพร็อพเพอร์ตี้ หมายเหตุ: เราขอแนะนำให้คุณเปลี่ยนเงื่อนไขของกฎข้อบกพร่องที่มีอยู่เพื่อจับทั้งชื่อ |
GenerateAccessToken RefreshAccessToken |
steps.oauth.v2.InvalidRequest |
400 | ชื่อข้อผิดพลาดนี้ใช้สำหรับข้อผิดพลาดหลายประเภท โดยปกติแล้วจะใช้กับพารามิเตอร์ที่ขาดหายไปหรือไม่ถูกต้องซึ่งส่งในคำขอ หากตั้งค่า <GenerateResponse> เป็น false ให้ใช้ตัวแปรข้อบกพร่อง (อธิบายไว้ด้านล่าง) เพื่อดึงรายละเอียดเกี่ยวกับข้อผิดพลาด เช่น ชื่อและสาเหตุของข้อบกพร่อง |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
steps.oauth.v2.InvalidAccessToken |
401 | ส่วนหัวการให้สิทธิ์ไม่มีคำว่า "Bearer" ซึ่งจำเป็นต้องมี เช่น Authorization: Bearer your_access_token |
VerifyAccessToken |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 |
พร็อกซี API ไม่ได้อยู่ในผลิตภัณฑ์ที่เชื่อมโยงกับโทเค็นการเข้าถึง เคล็ดลับ: ตรวจสอบว่าผลิตภัณฑ์ที่เชื่อมโยงกับโทเค็นการเข้าถึงได้รับการกําหนดค่าอย่างถูกต้อง เช่น หากคุณใช้ไวลด์การ์ดในเส้นทางทรัพยากร ให้ตรวจสอบว่าใช้ไวลด์การ์ดอย่างถูกต้อง ดูรายละเอียดได้ที่สร้างผลิตภัณฑ์ API โปรดดูคำแนะนำเพิ่มเติมเกี่ยวกับสาเหตุของข้อผิดพลาดนี้ในโพสต์นี้จากชุมชน Apigee |
VerifyAccessToken |
steps.oauth.v2.InvalidClientIdentifier |
500 |
ระบบจะแสดงชื่อข้อผิดพลาดนี้เมื่อตั้งค่าพร็อพเพอร์ตี้ |
GenerateAccessToken |
steps.oauth.v2.InvalidParameter |
500 | นโยบายต้องระบุโทเค็นการเข้าถึงหรือรหัสการให้สิทธิ์อย่างใดอย่างหนึ่งเท่านั้น | GenerateAuthorizationCode GenerateAccessTokenImplicitGrant |
steps.oauth.v2.InvalidTokenType |
500 | องค์ประกอบ <Tokens>/<Token> กำหนดให้คุณระบุประเภทโทเค็น (เช่น refreshtoken ) หากไคลเอ็นต์ส่งประเภทที่ไม่ถูกต้อง ระบบจะแสดงข้อผิดพลาดนี้ |
ValidateToken InvalidateToken |
steps.oauth.v2.MissingParameter |
500 | ประเภทคำตอบคือ token แต่ไม่ได้ระบุประเภทการให้เงินสนับสนุน |
GenerateAuthorizationCode GenerateAccessTokenImplicitGrant |
steps.oauth.v2.UnSupportedGrantType |
500 |
ไคลเอ็นต์ระบุประเภทการให้สิทธิ์ที่นโยบายไม่รองรับ (ไม่ได้ระบุไว้ในองค์ประกอบ <SupportedGrantTypes>) หมายเหตุ: ปัจจุบันมีข้อบกพร่องที่ระบบไม่แสดงข้อผิดพลาดเกี่ยวกับประเภทการให้สิทธิ์ที่ไม่รองรับอย่างถูกต้อง หากเกิดข้อผิดพลาดเกี่ยวกับประเภทการให้สิทธิ์ที่ไม่รองรับ พารามิเตอร์จะไม่เข้าสู่ขั้นตอนการดำเนินการที่ผิดพลาดตามที่คาดไว้ |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณติดตั้งใช้งานพร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ |
---|---|
InvalidValueForExpiresIn |
สำหรับองค์ประกอบ |
InvalidValueForRefreshTokenExpiresIn |
สำหรับองค์ประกอบ <RefreshTokenExpiresIn> ค่าที่ถูกต้องคือจำนวนเต็มบวกและ -1 |
InvalidGrantType |
มีการระบุประเภทการให้สิทธิ์ที่ไม่ถูกต้องในองค์ประกอบ <SupportedGrantTypes>
ดูรายการประเภทที่ใช้ได้ที่ข้อมูลอ้างอิงนโยบาย |
ExpiresInNotApplicableForOperation |
ตรวจสอบว่าการดำเนินการที่ระบุไว้ในองค์ประกอบ <Operations> รองรับการหมดอายุ เช่น การดำเนินการ VerifyToken จะไม่ดำเนินการ |
RefreshTokenExpiresInNotApplicableForOperation |
ตรวจสอบว่าการดำเนินการที่ระบุไว้ในองค์ประกอบ <Operations> รองรับการหมดอายุของโทเค็นรีเฟรช เช่น การดำเนินการ VerifyToken จะไม่ดำเนินการ |
GrantTypesNotApplicableForOperation |
ตรวจสอบว่าระบบรองรับประเภทการให้สิทธิ์ที่ระบุใน <SupportedGrantTypes> สำหรับการดำเนินการที่ระบุ |
OperationRequired |
คุณต้องระบุการดำเนินการในนโยบายนี้โดยใช้องค์ประกอบ หมายเหตุ: หากไม่มีองค์ประกอบ |
InvalidOperation |
คุณต้องระบุการดำเนินการที่ถูกต้องในนโยบายนี้โดยใช้องค์ประกอบ หมายเหตุ: หากองค์ประกอบ |
TokenValueRequired |
คุณต้องระบุค่าโทเค็น <Token> ในองค์ประกอบ <Tokens> |
ตัวแปรข้อบกพร่อง
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาดที่รันไทม์
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อข้อบกพร่องตามที่แสดงในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อบกพร่องคือส่วนสุดท้ายของรหัสข้อบกพร่อง | fault.name = "InvalidRequest" |
oauthV2.policy_name.failed |
policy_name คือชื่อนโยบายที่ผู้ใช้ระบุซึ่งทำให้เกิดข้อผิดพลาด | oauthV2.GenerateAccesstoken.failed = true |
oauthV2.policy_name.fault.name |
policy_name คือชื่อนโยบายที่ผู้ใช้ระบุซึ่งทำให้เกิดข้อผิดพลาด | oauthV2.GenerateAccesstoken.fault.name = InvalidRequest
หมายเหตุ: สําหรับการดําเนินการ VerifyAccessToken ชื่อข้อบกพร่องจะมีส่วนต่อท้าย |
oauthV2.policy_name.fault.cause |
policy_name คือชื่อนโยบายที่ผู้ใช้ระบุซึ่งทำให้เกิดข้อผิดพลาด | oauthV2.GenerateAccesstoken.cause = Required param : grant_type |
ตัวอย่างการตอบกลับข้อผิดพลาด
ระบบจะส่งการตอบกลับเหล่านี้กลับไปยังไคลเอ็นต์หากองค์ประกอบ <GenerateResponse>
เป็น true
หาก <GenerateResponse>
เป็น true นโยบายจะแสดงข้อผิดพลาดในรูปแบบนี้สําหรับการดำเนินการที่สร้างโทเค็นและรหัส ดูรายการทั้งหมดได้ที่ข้อมูลอ้างอิงการตอบกลับข้อผิดพลาด HTTP ของ OAuth
{"ErrorCode" : "invalid_client", "Error" :"ClientId is Invalid"}
หาก <GenerateResponse>
เป็น true นโยบายจะแสดงข้อผิดพลาดในรูปแบบนี้สําหรับการยืนยันและตรวจสอบการดำเนินการ ดูรายการทั้งหมดได้ที่ข้อมูลอ้างอิงการตอบกลับข้อผิดพลาด HTTP ของ OAuth
{ { "fault":{ "faultstring":"Invalid Access Token", "detail":{ "errorcode":"keymanagement.service.invalid_access_token" } } }
ตัวอย่างกฎข้อบกพร่อง
<FaultRule name=OAuthV2 Faults"> <Step> <Name>AM-InvalidClientResponse</Name> <Condition>(fault.name = "invalid_client") OR (fault.name = "InvalidClientIdentifier")</Condition> </Step> <Step> <Name>AM-InvalidTokenResponse</Name> <Condition>(fault.name = "invalid_access_token")</Condition> </Step> <Condition>(oauthV2.failed = true) </Condition> </FaultRule>
นโยบาย GetOAuthV2Info
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes. The error names shown below are the strings
that are assigned to the fault.name
variable when an error occurs. See the Fault
variables section below for more details.
Fault code | HTTP status | Cause |
---|---|---|
steps.oauth.v2.access_token_expired |
500 | The access token sent to the policy is expired. |
steps.oauth.v2.authorization_code_expired |
500 | The authorization code sent to the policy is expired. |
steps.oauth.v2.invalid_access_token |
500 | The access token sent to the policy is invalid. |
steps.oauth.v2.invalid_client-invalid_client_id |
500 | The client ID sent to the policy is invalid. |
steps.oauth.v2.invalid_refresh_token |
500 | The refresh token sent to the policy is invalid. |
steps.oauth.v2.invalid_request-authorization_code_invalid |
500 | The authorization code sent to the policy is invalid. |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | Please see this Apigee Community post for information about troubleshooting this error. |
steps.oauth.v2.refresh_token_expired |
500 | The refresh token sent to the policy is expired. |
Deployment errors
Refer to the message reported in the UI for information about deployment errors.
Fault variables
These variables are set when this policy triggers an error at runtime.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "IPDeniedAccess" |
oauthV2.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.GetTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.GetToKenInfo.fault.name = invalid_client-invalid_client_id |
oauthV2.policy_name.fault.cause |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.GetTokenInfo.cause = ClientID is Invalid |
Example error response
{ "fault":{ "faultstring":"ClientId is Invalid", "detail":{ "errorcode":"keymanagement.service.invalid_client-invalid_client_id" } } }
Example fault rule
<FaultRule name="OAuthV2 Faults"> <Step> <Name>AM-InvalidClientIdResponse</Name> </Step> <Condition>(fault.name = "invalid_client-invalid_client_id")</Condition> </FaultRule>
นโยบาย SetOAuthV2Info
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause |
---|---|---|
steps.oauth.v2.access_token_expired |
500 | The access token sent to the policy is expired. |
steps.oauth.v2.invalid_access_token |
500 | The access token sent to the policy is invalid. |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | Please see this Apigee Community post for information about troubleshooting this error. |
Deployment errors
Refer to the message reported in the UI for information about deployment errors.
Fault variables
These variables are set when this policy triggers an error at runtime.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name = "invalid_access_token" |
oauthV2.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.SetTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.SetTokenInfo.fault.name = invalid_access_token |
oauthv2.policy_name.fault.cause |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.SetTokenInfo.cause = Invalid Access Token |
Example error response
{ "fault": { "faultstring": "Invalid Access Token", "detail": { "errorcode": "keymanagement.service.invalid_access_token" } } }
Example fault rule
<FaultRule name=SetOAuthV2Info Faults&>quot;< > Step < > NameAM-InvalidTokenRes<ponse>/Name < Cond>ition(fault.name = "invalid_acce<ss_token&q>uot;)</Cond>ition< /Ste>p Condition(oauthV2.<failed = t>r<ue) /Condi>tion /FaultRule
นโยบาย DeleteOAuthV2Info
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ |
---|---|---|
steps.oauth.v2.invalid_access_token |
401 | โทเค็นเพื่อการเข้าถึงที่ส่งไปยังนโยบายไม่ถูกต้อง |
steps.oauth.v2.invalid_request-authorization_code_invalid |
401 | รหัสการให้สิทธิ์ที่ส่งไปยังนโยบายไม่ถูกต้อง |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | โปรดดูที่ โพสต์ชุมชน Apigee นี้เพื่อดูข้อมูลเกี่ยวกับการแก้ปัญหาข้อผิดพลาดนี้ |
ข้อผิดพลาดในการทำให้ใช้งานได้
โปรดดูข้อมูลเกี่ยวกับข้อผิดพลาดในการทำให้ใช้งานได้จากข้อความที่รายงานใน UI
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาดขณะรันไทม์
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name = "invalid_access_token" |
oauthV2.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | oauthV2.DeleteTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | oauthV2.DeleteTokenInfo.fault.name = invalid_access_token |
oauthv2.policy_name.fault.cause |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | oauthV2.DeleteTokenInfo.cause = Invalid Access Token |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "Invalid Access Token", "detail": { "errorcode": "keymanagement.service.invalid_access_token" } } }
ตัวอย่างกฎข้อผิดพลาด
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="DeleteOAuthV2Info_Faults"> <Step> <Name>AM-InvalidTokenResponse</Name> </Step> <Condition>(fault.name = "invalid_access_token")</Condition> </FaultRule>
นโยบาย OAuthv1.0a
ประเภทนโยบาย OAuthV1 จะกําหนดรหัสข้อผิดพลาดต่อไปนี้
สําหรับรหัสข้อผิดพลาด HTTP ที่เกี่ยวข้องกับ OAuth โปรดดูที่ข้อมูลอ้างอิงการตอบกลับข้อผิดพลาด HTTP ของ OAuth
รหัสข้อผิดพลาด | ข้อความ |
---|---|
AppKeyNotResolved |
Could not resolve the app key with variable {0} |
ConsumerKeyNotResolved |
Could not resolve the consumer key with variable {0} |
RequestTokenNotResolved |
Could not resolve the request token with the variable {0} |
AccessTokenNotResolved |
Could not resolve the access token with the variable {0} |
ResponseGenerationError |
Error while generating response : {0} |
UnableToDetermineOperation |
Unable to determine an operation for stepDefinition {0} |
UnableToResolveOAuthConfig |
Unable to resolve the OAuth configuration for {0} |
AtLeastOneParamRequired |
At least one of AccessToken, RequestToken or ConsumerKey must be specified in
stepDefinition {0} |
SpecifyValueOrRefReqToken |
Specify Request Token as value or ref in stepDefinition {0} |
SpecifyValueOrRefAccToken |
Specify Access Token as value or ref in stepDefinition {0} |
SpecifyValueOrRefConKey |
Specify Consumer Key as value or ref in stepDefinition {0} |
SpecifyValueOrRefAppKey |
Specify App Key as value or ref in stepDefinition {0} |
ExpiresInNotApplicableForOperation |
ExpiresIn element is not valid for operation {0} |
InvalidValueForExpiresIn |
Invalid value for ExpiresIn element for operation {0} |
FailedToFetchApiProduct |
Failed to fetch api product for key {0} |
InvalidTokenType |
Valid token types : {0}, Invalid toke type {1} in stepDefinition {2} |
TokenValueRequired |
Token value is required in stepDefinition {0} |
FailedToResolveRealm |
Failed to resolve realm {0} |
นโยบาย GetOAuthV1Info
ไม่มีการระบุรหัสข้อผิดพลาดสําหรับนโยบายการรับ OAuth v1.0a
นโยบาย DeleteOAuthV1Info
เมื่อสำเร็จ นโยบายจะแสดงสถานะ 200
หากไม่สำเร็จ นโยบายจะแสดง 404 และเอาต์พุตที่คล้ายกับข้อความต่อไปนี้ (ขึ้นอยู่กับว่า คุณกำลังลบโทเค็นเพื่อการเข้าถึง โทเค็นคำขอ หรือเครื่องมือยืนยัน):
HTTP/1.1 404 Not Found Content-Type: application/json Content-Length: 144 Connection: keep-alive {"fault":{"faultstring":"Invalid Access Token","detail":{"errorcode":"keymanagement.service.invalid_request-access_token_invalid"}}}
นโยบาย PythonScript
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่ส่งกลับและตัวแปรข้อบกพร่อง ที่ Edge กำหนดไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้สำคัญที่ควรทราบ หากคุณพัฒนากฎความผิด จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.script.ScriptEvaluationFailed |
500 | นโยบาย PythonScript แสดงข้อผิดพลาด ScriptExecutionFailed หลายประเภท พบได้ทั่วไป ประเภทข้อผิดพลาดที่เห็น ได้แก่ NameError และ ZeroDivisionError | build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidResourceUrlFormat |
หากรูปแบบของ URL ทรัพยากรที่ระบุภายใน <ResourceURL> หรือ
องค์ประกอบ <IncludeURL> ของนโยบาย PythonScript ไม่ถูกต้อง การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลว |
build |
InvalidResourceUrlReference |
หากองค์ประกอบ <ResourceURL> หรือ <IncludeURL>
อ้างอิงไฟล์ PythonScript ที่ไม่มีอยู่ การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
ไฟล์แหล่งที่มาที่อ้างอิงต้องมีอยู่ในพร็อกซี API, สภาพแวดล้อม หรือองค์กร |
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาดขณะรันไทม์ สำหรับข้อมูลเพิ่มเติม ดูสิ่งที่คุณ ที่ต้องทราบเกี่ยวกับข้อผิดพลาดด้านนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "ScriptExecutionFailed" |
pythonscript.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | pythonscript.PythonScript-1.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "Execution of SetResponse failed with error: Pythonscript runtime error: "ReferenceError: "status" is not defined.\"", "detail": { "errorcode": "steps.script.ScriptExecutionFailed" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="PythonScript Policy Faults"> <Step> <Name>AM-CustomErrorResponse</Name> <Condition>(fault.name Matches "ScriptExecutionFailed") </Condition> </Step> <Condition>(pythonscript.PythonScript-1.failed = true) </Condition> </FaultRule>
นโยบายโควต้า
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
policies.ratelimit.FailedToResolveQuotaIntervalReference |
500 | เกิดขึ้นเมื่อไม่ได้กำหนดองค์ประกอบ <Interval> ภายในนโยบายโควต้า องค์ประกอบนี้
เป็นข้อมูลบังคับและใช้เพื่อระบุช่วงเวลาที่ใช้กับโควต้า ช่วงเวลา
อาจเป็นนาที ชั่วโมง วัน สัปดาห์ หรือเดือนตามที่กำหนดไว้ในองค์ประกอบ <TimeUnit> |
build |
policies.ratelimit.FailedToResolveQuotaIntervalTimeUnitReference |
500 | เกิดขึ้นเมื่อไม่ได้กำหนดองค์ประกอบ <TimeUnit> ภายในนโยบายโควต้า องค์ประกอบนี้
เป็นข้อมูลบังคับและใช้เพื่อระบุหน่วยเวลาที่ใช้กับโควต้า ช่วงเวลา
อาจเป็นนาที ชั่วโมง วัน สัปดาห์ หรือเดือน |
build |
policies.ratelimit.InvalidMessageWeight |
500 | เกิดขึ้นเมื่อค่าขององค์ประกอบ <MessageWeight> ที่ระบุผ่านตัวแปรโฟลว์
ไม่ถูกต้อง (ค่าที่ไม่ใช่จำนวนเต็ม) |
build |
policies.ratelimit.QuotaViolation |
500 | เกินโควต้าแล้ว | ไม่มี |
ข้อผิดพลาดในการทำให้ใช้งานได้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidQuotaInterval |
หากช่วงเวลาโควต้าที่ระบุในองค์ประกอบ <Interval> ไม่
จำนวนเต็ม การทำให้พร็อกซี API ใช้งานได้ล้มเหลว ตัวอย่างเช่น ถ้าช่วงโควต้า
ที่ระบุคือ 0.1 ในองค์ประกอบ <Interval> แล้วการทำให้ใช้งานได้ของ
พร็อกซี API ล้มเหลว
|
build |
InvalidQuotaTimeUnit |
หากระบบไม่รองรับหน่วยเวลาที่ระบุในองค์ประกอบ <TimeUnit>
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว หน่วยเวลาที่รองรับคือ minute
hour , day , week และ month
|
build |
InvalidQuotaType |
หากประเภทของโควต้าที่ระบุโดยแอตทริบิวต์ type ใน <Quota>
องค์ประกอบไม่ถูกต้อง การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลว
ประเภทโควต้าที่รองรับคือ default , calendar , flexi และ rollingwindow
|
build |
InvalidStartTime |
หากรูปแบบของเวลาที่ระบุในองค์ประกอบ <StartTime> คือ
จะทำให้การใช้งานพร็อกซี API ล้มเหลว รูปแบบที่ถูกต้องคือ yyyy-MM-dd HH:mm:ss
ซึ่งจะอยู่ในรูปแบบวันที่และเวลา ISO 8601 สำหรับ
ตัวอย่างเช่น หากเวลาที่ระบุในองค์ประกอบ <StartTime> คือ
7-16-2017 12:00:00 การทำให้พร็อกซี API ใช้งานได้ล้มเหลว
|
build |
StartTimeNotSupported |
หากมีการระบุองค์ประกอบ <StartTime> ซึ่งไม่ได้กำหนดประเภทโควต้า
calendar การทำให้พร็อกซี API ใช้งานได้ล้มเหลว องค์ประกอบ <StartTime> คือ
รองรับเฉพาะโควต้าประเภท calendar ตัวอย่างเช่น หากมีการตั้งค่าแอตทริบิวต์ type
เป็น flexi หรือ rolling window ในองค์ประกอบ <Quota> แล้วตามด้วยค่า
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว
|
build |
InvalidTimeUnitForDistributedQuota |
หากตั้งค่าองค์ประกอบ <Distributed> เป็น true และตั้งค่าองค์ประกอบ <TimeUnit> เป็น
second การทำให้พร็อกซี API ใช้งานได้ล้มเหลว หน่วยเวลา second ไม่ถูกต้องสำหรับ
โควต้าแบบกระจาย |
build |
InvalidSynchronizeIntervalForAsyncConfiguration |
หากค่าที่ระบุสำหรับองค์ประกอบ <SyncIntervalInSeconds> ภายในองค์ประกอบ
องค์ประกอบ <AsynchronousConfiguration> ในนโยบายโควต้ามีค่าน้อยกว่า 0 ดังนั้นค่า
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว |
build |
InvalidAsynchronizeConfigurationForSynchronousQuota |
หากค่าขององค์ประกอบ <AsynchronousConfiguration> ได้รับการตั้งค่าเป็น true ในนโยบายโควต้า ซึ่ง
มีการกำหนดค่าอะซิงโครนัสโดยใช้องค์ประกอบ <AsynchronousConfiguration> แล้ว
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว |
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อนโยบายนี้ทำให้เกิดข้อผิดพลาด โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "QuotaViolation" |
ratelimit.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | ratelimit.QT-QuotaPolicy.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "detail":{ "errorcode":"policies.ratelimit.QuotaViolation" }, "faultstring":"Rate limit quota violation. Quota limit exceeded. Identifier : _default" } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="Quota Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "QuotaViolation") </Condition> </Step> <Condition>ratelimit.Quota-1.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย ResetQuota
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
policies.resetquota.InvalidRLPolicy |
500 | นโยบายโควต้าที่ระบุในองค์ประกอบ <Quota> ของนโยบายการรีเซ็ตโควต้าไม่ได้กำหนดในพร็อกซี API จึงไม่พร้อมใช้งานระหว่างขั้นตอน องค์ประกอบ <Quota> เป็นองค์ประกอบที่จำเป็นและระบุนโยบายโควต้าเป้าหมายที่ควรอัปเดตตัวนับผ่านนโยบายการรีเซ็ตโควต้า |
build |
policies.resetquota.FailedToResolveAllowCountRef |
ไม่มีข้อมูล | การอ้างอิงไปยังตัวแปรที่มีจำนวนที่อนุญาตในองค์ประกอบ <Allow> ของนโยบายไม่สามารถแปลงเป็นค่าได้ องค์ประกอบนี้เป็นสิ่งที่จำเป็นและระบุจำนวนที่จะลดตัวนับโควต้า |
build |
policies.resetquota.FailedToResolveRLPolicy |
500 | ระบบจับคู่ตัวแปรที่แอตทริบิวต์ ref อ้างอิงในองค์ประกอบ <Quota> ไม่ได้ |
build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidCount |
หากค่าการนับที่ระบุในองค์ประกอบ <Allow> ของนโยบายการรีเซ็ตโควต้าไม่ใช่จำนวนเต็ม การทำให้พร็อกซี API ใช้งานได้จะไม่สำเร็จ
|
build |
นโยบาย RaiseFault
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่ส่งกลับและตัวแปรข้อบกพร่อง ที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่ สิ่งที่คุณต้องรู้เกี่ยวกับข้อผิดพลาดของนโยบายและ การจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ |
---|---|---|
steps.raisefault.RaiseFault |
500 | ดูสตริงข้อผิดพลาด |
ข้อผิดพลาดในการทำให้ใช้งานได้
ไม่มี
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ใน ตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดเป็นชื่อสุดท้าย ของรหัสข้อผิดพลาด | fault.name = "RaiseFault" |
raisefault.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบาย เกิดความผิดพลาด | raisefault.RF-ThrowError.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault":{ "detail":{ "errorcode":"steps.raisefault.RaiseFault" }, "faultstring":"Raising fault. Fault name: [name]" } }
นโยบาย RegularExpressionProtection
This section describes the error codes and messages returned and fault variables
set by Edge when this policy triggers an error. This information is important to know if
you are developing fault rules to handle faults. If you want to capture an error and raise your own
custom error, set the continueOnError="true"
attribute on the policy root element.
To learn more, see
What you need to know about policy errors and Handling
faults.
Errors returned from Edge policies follow a consistent format as described in the Error code reference.
Runtime errors
These errors can occur when the policy executes.
Error Code | Message |
---|---|
ExecutionFailed | Failed to execute the RegularExpressionProtection StepDefinition {0}. Reason: {1} |
InstantiationFailed | Failed to instantiate the RegularExpressionProtection StepDefinition {0} |
NonMessageVariable | Variable {0} does not resolve to a Message |
SourceMessageNotAvailable | {0} message is not available for RegularExpressionProtection StepDefinition {1} |
ThreatDetected | Regular Expression Threat Detected in {0}: regex: {1} input: {2} |
VariableResolutionFailed | Failed to resolve variable {0} |
Deployment errors
Error Code | Message | Fix |
---|---|---|
CannotBeConvertedToNodeset | RegularExpressionProtection {0}: Result of xpath {1} cannot be converted to nodeset. Context {2} | build |
DuplicatePrefix | RegularExpressionProtection {0}: Duplicate prefix {1} | build |
EmptyJSONPathExpression | RegularExpressionProtection {0}: Empty JSONPath expression | build |
EmptyXPathExpression | RegularExpressionProtection {0}: Empty XPath expression | build |
InvalidRegularExpression | RegularExpressionProtection {0}: Invalid Regular Expression {1}, Context {2} | build |
JSONPathCompilationFailed | RegularExpressionProtection {0}: Failed to compile jsonpath {1}. Context {2} | build |
NONEmptyPrefixMappedToEmptyURI | RegularExpressionProtection {0}: Non-empty prefix {1} cannot be mapped to empty uri | build |
NoPatternsToEnforce | RegularExpressionProtection {0}: No patterns to enforce in {1} | build |
NothingToEnforce | RegularExpressionProtection {0}: at least one of URIPath, QueryParam, Header, FormParam, XMLPayload, JSONPayload is mandatory | build |
XPathCompilationFailed | RegularExpressionProtection {0}: Failed to compile xpath {1}. Context {2} | build |
Fault variables
These variables are set when this policy triggers an error. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the table above. | fault.name Matches "ThreatDetected" |
regularexpressionprotection.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | regularexpressionprotection.Regular-Expressions-Protection-1.failed = true |
นโยบาย SOAPMessageValidation
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.messagevalidation.SourceMessageNotAvailable |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากตัวแปรที่ระบุในองค์ประกอบ
|
build |
steps.messagevalidation.NonMessageVariable |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากมีการตั้งค่าองค์ประกอบ ตัวแปรประเภทข้อความจะเป็นตัวแทนของคำขอและการตอบกลับ HTTP ทั้งหมด ตัวแปรโฟลว์ Edge ในตัว |
build |
steps.messagevalidation.Failed |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากนโยบาย SOAPMessageValidation ตรวจสอบเพย์โหลดของข้อความอินพุตกับสคีมา XSD หรือคำจำกัดความ WSDL ไม่สำเร็จ และจะเกิดขึ้นหากมี JSON หรือ XML ที่มีรูปแบบไม่ถูกต้องในข้อความเพย์โหลด | build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidResourceType |
องค์ประกอบ <ResourceURL> ในนโยบาย SOAPMessageValidation มีการตั้งค่าเป็นประเภททรัพยากรที่นโยบายไม่รองรับ
|
build |
ResourceCompileFailed |
สคริปต์ทรัพยากรที่อ้างอิงในองค์ประกอบ <ResourceURL> ของนโยบาย SOAPMessageValidation มีข้อผิดพลาดที่ทำให้คอมไพล์ไม่ได้
|
build |
RootElementNameUnspecified |
องค์ประกอบ <Element> ในนโยบาย SOAPMessageValidation ไม่มีชื่อขององค์ประกอบราก |
build |
InvalidRootElementName |
องค์ประกอบ <Element> ในนโยบาย SOAPMessageValidation มีชื่อองค์ประกอบรูทที่ไม่สอดคล้องกับกฎ XML สำหรับการตั้งชื่อองค์ประกอบที่ถูกต้อง |
build |
นโยบาย SAMLAssertion
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดง และตัวแปรข้อผิดพลาดที่กำหนดโดย Edge เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
SourceNotConfigured |
องค์ประกอบต่อไปนี้อย่างน้อย 1 รายการสำหรับ Verified SAML Assertion
ไม่ได้กำหนดนโยบายหรือว่างเปล่า: <Source> , <XPath>
<Namespaces> , <Namespace>
|
build |
TrustStoreNotConfigured |
หากองค์ประกอบ <TrustStore> ว่างเปล่าหรือไม่ได้ระบุใน
นโยบาย VerifySAMLAssertion จะทำให้การทำให้พร็อกซี API ใช้งานได้ล้มเหลว
ต้องระบุ Trust Store ที่ถูกต้อง
|
build |
NullKeyStoreAlias |
หากองค์ประกอบย่อย <Alias> ว่างเปล่าหรือไม่ได้ระบุใน <Keystore>
ของนโยบาย Generate SAML Assertion แล้วทำให้ API ใช้งานได้
พร็อกซีไม่ทำงาน ต้องมีชื่อแทนคีย์สโตร์ที่ถูกต้อง
|
build |
NullKeyStore |
หากองค์ประกอบย่อย <Name> ว่างเปล่าหรือไม่ได้ระบุใน <Keystore>
ของนโยบาย GenerateSAMLAssertion แล้ว การทำให้ API ใช้งานได้
พร็อกซีไม่ทำงาน ต้องระบุชื่อคีย์สโตร์ที่ถูกต้อง
|
build |
NullIssuer |
หากองค์ประกอบ <Issuer> ว่างเปล่าหรือไม่ได้ระบุในส่วน "สร้าง SAML"
นโยบายการยืนยัน การทำให้พร็อกซี API ใช้งานได้ล้มเหลว ต
ต้องระบุค่า <Issuer> ที่ถูกต้อง
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาด ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name = "InvalidMediaTpe" |
GenerateSAMLAssertion.failed |
สำหรับการกำหนดค่านโยบายการยืนยัน SAML ที่ตรวจสอบความถูกต้อง คำนำหน้าข้อผิดพลาดคือ
ValidateSAMLAssertion |
GenerateSAMLAssertion.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "GenerateSAMLAssertion[GenSAMLAssert]: Invalid media type", "detail": { "errorcode": "steps.saml.generate.InvalidMediaTpe" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="invalid_saml_rule"> <Step> <Name>invalid-saml</Name> </Step> <Condition>(GenerateSAMLAssertion.failed = "true")</Condition> </FaultRule> </FaultRules>
นโยบาย ServiceCallout
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.servicecallout.ExecutionFailed |
500 |
This error can occur when:
|
build |
steps.servicecallout.RequestVariableNotMessageType |
500 | The Request variable specified in the policy is not of type Message. For example, if it's a string or other non-message type, you'll see this error. | build |
steps.servicecallout.RequestVariableNotRequestMessageType |
500 | The Request variable specified in the policy is not of type Request Message. For example, if it's a Response type, you'll see this error. | build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
URLMissing |
The <URL> element inside <HTTPTargetConnection>
is missing or empty. |
build |
ConnectionInfoMissing |
This error happens if the policy does not have an
<HTTPTargetConnection> or <LocalTargetConnection>
element. |
build |
InvalidTimeoutValue |
This error happens if the <Timeout> value is negative or zero. |
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name = "RequestVariableNotMessageType" |
servicecallout.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | servicecallout.SC-GetUserData.failed = true |
Example error response
{ "fault":{ "detail":{ "errorcode":"steps.servicecallout.RequestVariableNotMessageType" }, "faultstring":"ServiceCallout[ServiceCalloutGetMockResponse]: request variable data_str value is not of type Message" } }
Example fault rule
<faultrule name="VariableOfNonMsg><Type"></faultruleFaultRule name="RequestVariable>NotMe<ssag>eType&quo<t; > Step NameAM-RequestVa<riabl>eNotM<essag>eType</Name > /Step Condition(fault.name = "Reques<tVariableN>o<tMessageTy>pe")/Condition /FaultRule
นโยบาย SpikeArrest
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
policies.ratelimit.FailedToResolveSpikeArrestRate |
500 |
This error occurs if the reference to the variable containing the rate setting
within the <Rate> element cannot be resolved to a value within the Spike Arrest
policy. This element is mandatory and used to specify the spike arrest rate in
the form of intpm or intps . |
build |
policies.ratelimit.InvalidMessageWeight |
500 |
This error occurs if the value specified for the <MessageWeight> element through
a flow variable is invalid (a non-integer value). |
build |
policies.ratelimit.SpikeArrestViolation |
429 |
The rate limit was exceeded. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidAllowedRate |
If the spike arrest rate specified in the <Rate> element of the Spike Arrest
Policy is not an integer or if the rate does not have ps or pm as a suffix,
then the deployment of the API proxy fails. |
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "SpikeArrestViolation" |
ratelimit.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | ratelimit.SA-SpikeArrestPolicy.failed = true |
Example error response
Shown below is an example error response:
{ "fault":{ "detail":{ "errorcode":"policies.ratelimit.SpikeArrestViolation" }, "faultstring":"Spike arrest violation. Allowed rate : 10ps" } }
Example fault rule
Shown below is an example fault rule to handle a SpikeArrestViolation
fault:
<FaultRules> <FaultRule name="Spike Arrest Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "SpikeArrestViolation") </Condition> </Step> <Condition>ratelimit.Spike-Arrest-1.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย StatisticsCollector
This section describes the error messages and flow variables that are set when this policy triggers an error. This information is important to know if you are developing fault rules for a proxy. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
None.
Deployment errors
Error name | Cause | Fix |
---|---|---|
UnsupportedDatatype |
If the type of the variable specified by the ref attribute in the <Statistic> element
of the Statistics Collector policy is unsupported, then the deployment of the API proxy
fails. The supported data types are string , integer ,
float , long , double , and boolean . |
build |
InvalidName |
If the name used to reference the data collected for the specified variable defined
within the <Statistic> element of the Statistics Collector policy conflicts with a
system-defined variable, then the deployment of the API proxy fails. Some of the known
system-defined variables are organization and environment . |
build |
DatatypeMissing |
If the type of the variable specified by the ref attribute in the <Statistic> element
of the Statistics Collector policy is missing, then the deployment of the API proxy fails. |
build |
Fault variables
None.
นโยบาย VerifyAPIKey
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause |
---|---|---|
keymanagement.service.CompanyStatusNotActive |
401 | The Company associated with the Developer App that has the API key you are using has an inactive status. When a Company's status is set to inactive, you cannot access the developers or apps associated with that Company. An org admin can change a Company's status using the management API. See Set the Status of a Company. |
keymanagement.service.DeveloperStatusNotActive |
401 |
The developer who created the Developer App that has the API key you are using has an inactive status. When an App Developer's status is set to inactive, any Developer Apps created by that developer are deactivated. An admin user with appropriate permissions (such as Organization Administrator) can change a developer's status in the following ways:
|
keymanagement.service.invalid_client-app_not_approved |
401 | The Developer App associated with the API key is revoked. A revoked app cannot access any API products and cannot invoke any API managed by Apigee Edge. An org admin can change the status of a Developer App using the management API. See Approve or Revoke Developer App. |
oauth.v2.FailedToResolveAPIKey |
401 | The policy expects to find the API key in a variable that is specified in the policy's <APIKey> element. This error arises when the expected variable does not exist (it cannot be resolved). |
oauth.v2.InvalidApiKey |
401 | An API key was received by Edge, but it is invalid. When Edge looks up the key in its database, it must exactly match the on that was sent in the request. If the API worked previously, make sure the key was not regenerated. If the key was regenerated, you will see this error if you try to use the old key. For details, see Register apps and manage API keys. |
oauth.v2.InvalidApiKeyForGivenResource |
401 | An API key was received by Edge, and it is valid; however, it does not match an approved key in the Developer App associated with your API proxy through a Product. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause |
---|---|
SpecifyValueOrRefApiKey |
The <APIKey> element does not have a value or key specified. |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "FailedToResolveAPIKey" |
oauthV2.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | oauthV2.VK-VerifyAPIKey.failed = true |
Example error responses
{ "fault":{ "faultstring":"Invalid ApiKey", "detail":{ "errorcode":"oauth.v2.InvalidApiKey" } } }
{ "fault":{ "detail":{ "errorcode":"keymanagement.service.DeveloperStatusNotActive" }, "faultstring":"Developer Status is not Active" } }
Example fault rule
<FaultRule name="FailedToResolveAPIKey"> <Step> <Name>AM-FailedToResolveAPIKey</Name> </Step> <Condition>(fault.name Matches "FailedToResolveAPIKey") </Condition> </FaultRule>
นโยบาย VerifyJWS
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jws.AlgorithmInTokenNotPresentInConfiguration |
401 | Occurs when the verification policy has multiple algorithms |
steps.jws.AlgorithmMismatch |
401 | The algorithm specified in the header by the Generate policy did not match the one expected in the Verify policy. The algorithms specified must match. |
steps.jws.ContentIsNotDetached |
401 | <DetachedContent> is specified when the JWS does not contain a
detached content payload. |
steps.jws.FailedToDecode |
401 | The policy was unable to decode the JWS. The JWS is possibly corrupted. |
steps.jws.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm |
steps.jws.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jws.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jws.InvalidJsonFormat |
401 | Invalid JSON found in the JWS header. |
steps.jws.InvalidJws |
401 | This error occurs when the JWS signature verification fails. |
steps.jws.InvalidPayload |
401 | The JWS payload is invalid. |
steps.jws.InvalidSignature |
401 | <DetachedContent> is omitted and the JWS has a detached content payload. |
steps.jws.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWS does not
include a kid property in the header. |
steps.jws.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jws.MissingPayload |
401 | The JWS payload is missing. |
steps.jws.NoAlgorithmFoundInHeader |
401 | Occurs when the JWS omits the algorithm header. |
steps.jws.NoMatchingPublicKey |
401 | The Verify policy uses a JWKS as a source for public keys, but the kid
in the signed JWS is not listed in the JWKS. |
steps.jws.UnhandledCriticalHeader |
401 | A header found by the Verify JWS policy in the crit header is not
listed in KnownHeaders . |
steps.jws.UnknownException |
401 | An unknown exception occurred. |
steps.jws.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when |
---|---|
InvalidAlgorithm |
The only valid values are: RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512. |
|
Other possible deployment errors. |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWS.failed |
นโยบาย JWS ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | jws.JWS-Policy.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWS Policy Er>rors"<; > Step < > NameJa<vaScr>ipt-1/Name < > Condition(fault.name Matches "<;TokenExpi>red"<)/Con>dition < /St>ep Cond<itionJWS.f>ailed<=true/Cond>i<tion /F>aultRule /FaultRules
นโยบาย VerifyJWT
ส่วนนี้จะอธิบายโค้ดข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงผลและตัวแปรข้อผิดพลาดที่ Edge กําหนดเมื่อนโยบายนี้ทําให้เกิดข้อผิดพลาด ข้อมูลนี้เป็นสิ่งสำคัญที่ต้องทราบหากคุณกำลังกำหนดกฎข้อผิดพลาดเพื่อจัดการกับข้อผิดพลาด ดูข้อมูลเพิ่มเติมได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | เกิดขึ้นเมื่อ |
---|---|---|
steps.jwt.AlgorithmInTokenNotPresentInConfiguration |
401 | เกิดขึ้นเมื่อนโยบายการยืนยันมีอัลกอริทึมหลายรายการ |
steps.jwt.AlgorithmMismatch |
401 | อัลกอริทึมที่ระบุในนโยบายการสร้างไม่ตรงกับอัลกอริทึมในนโยบาย "ยืนยัน" อัลกอริทึมที่ระบุต้องตรงกัน |
steps.jwt.FailedToDecode |
401 | นโยบายนี้ถอดรหัส JWT ไม่ได้ JWT อาจเสียหาย |
steps.jwt.GenerationFailed |
401 | นโยบายสร้าง JWT ไม่ได้ |
steps.jwt.InsufficientKeyLength |
401 | สำหรับคีย์ที่มีขนาดเล็กกว่า 32 ไบต์สำหรับอัลกอริทึม HS256 ขนาดน้อยกว่า 48 ไบต์สำหรับอัลกอริทึม HS386 และน้อยกว่า 64 ไบต์สำหรับอัลกอริทึม HS512 |
steps.jwt.InvalidClaim |
401 | สำหรับการอ้างสิทธิ์ที่ขาดหายไปหรือการอ้างสิทธิ์ไม่ตรงกัน หรือส่วนหัวที่ขาดหายไปหรือส่วนหัวไม่ตรงกัน |
steps.jwt.InvalidCurve |
401 | เส้นโค้งที่คีย์ระบุไม่ถูกต้องสำหรับอัลกอริทึม Elliptic Curve |
steps.jwt.InvalidJsonFormat |
401 | พบ JSON ที่ไม่ถูกต้องในส่วนหัวหรือเพย์โหลด |
steps.jwt.InvalidToken |
401 | ข้อผิดพลาดนี้เกิดขึ้นเมื่อการยืนยันลายเซ็น JWT ล้มเหลว |
steps.jwt.JwtAudienceMismatch |
401 | การอ้างสิทธิ์กลุ่มเป้าหมายล้มเหลวในการยืนยันโทเค็น |
steps.jwt.JwtIssuerMismatch |
401 | การอ้างสิทธิ์ของผู้ออกบัตรล้มเหลวในการยืนยันโทเค็น |
steps.jwt.JwtSubjectMismatch |
401 | เรื่องการอ้างสิทธิ์ล้มเหลวในการยืนยันโทเค็น |
steps.jwt.KeyIdMissing |
401 | นโยบาย "ยืนยัน" ใช้ JWKS เป็นแหล่งที่มาสำหรับคีย์สาธารณะ แต่ JWT ที่ลงนามไม่มีพร็อพเพอร์ตี้ kid ในส่วนหัว |
steps.jwt.KeyParsingFailed |
401 | ไม่สามารถแยกวิเคราะห์คีย์สาธารณะจากข้อมูลคีย์ที่ระบุ |
steps.jwt.NoAlgorithmFoundInHeader |
401 | เกิดขึ้นเมื่อ JWT ไม่มีส่วนหัวอัลกอริทึม |
steps.jwt.NoMatchingPublicKey |
401 | นโยบายยืนยันใช้ JWKS เป็นแหล่งที่มาสำหรับคีย์สาธารณะ แต่ kid ใน JWT ที่ลงนามแล้วไม่ได้แสดงอยู่ใน JWKS |
steps.jwt.SigningFailed |
401 | ใน GenerateJWT สำหรับคีย์ที่มีขนาดเล็กกว่าขนาดต่ำสุดสำหรับอัลกอริทึม HS384 หรือ HS512 |
steps.jwt.TokenExpired |
401 | นโยบายจะพยายามยืนยันโทเค็นที่หมดอายุ |
steps.jwt.TokenNotYetValid |
401 | โทเค็นยังไม่ถูกต้อง |
steps.jwt.UnhandledCriticalHeader |
401 | ส่วนหัวที่พบในนโยบาย "ยืนยัน JWT" ในส่วนหัว crit จะไม่ปรากฏใน KnownHeaders |
steps.jwt.UnknownException |
401 | เกิดข้อผิดพลาดที่ไม่ทราบสาเหตุ |
steps.jwt.WrongKeyType |
401 | ประเภทคีย์ที่ระบุไม่ถูกต้อง เช่น หากคุณระบุคีย์ RSA สำหรับอัลกอริทึม Elliptic Curve หรือคีย์เส้นโค้งสำหรับอัลกอริทึม RSA |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
InvalidNameForAdditionalClaim |
การทำให้ใช้งานได้จะล้มเหลวหากการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> มีชื่อที่จดทะเบียนอย่างใดอย่างหนึ่งต่อไปนี้ kid , iss , sub , aud , iat , exp , nbf หรือ jti
|
build |
InvalidTypeForAdditionalClaim |
หากการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ใช่ประเภท string , number , boolean หรือ map การทำให้ใช้งานได้จะล้มเหลว
|
build |
MissingNameForAdditionalClaim |
หากไม่ได้ระบุชื่อการอ้างสิทธิ์ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidNameForAdditionalHeader |
ข้อผิดพลาดนี้จะเกิดขึ้นเมื่อชื่อของการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> เป็น alg หรือ typ
|
build |
InvalidTypeForAdditionalHeader |
หากประเภทของการอ้างสิทธิ์ที่ใช้ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ใช่ประเภท string , number , boolean หรือ map การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidValueOfArrayAttribute |
ข้อผิดพลาดนี้เกิดขึ้นเมื่อค่าของแอตทริบิวต์อาร์เรย์ในองค์ประกอบย่อย <Claim> ขององค์ประกอบ <AdditionalClaims> ไม่ได้ตั้งค่าเป็น true หรือ false
|
build |
InvalidValueForElement |
หากค่าที่ระบุในองค์ประกอบ <Algorithm> ไม่ใช่ค่าที่รองรับ การทำให้ใช้งานได้จะล้มเหลว
|
build |
MissingConfigurationElement |
ข้อผิดพลาดนี้จะเกิดขึ้นหากไม่ได้ใช้องค์ประกอบ <PrivateKey> กับอัลกอริทึมตระกูล RSA หรือไม่ได้ใช้องค์ประกอบ <SecretKey> กับอัลกอริทึมครอบครัว HS
|
build |
InvalidKeyConfiguration |
หากไม่ได้กำหนดองค์ประกอบย่อย <Value> ในองค์ประกอบ <PrivateKey> หรือ <SecretKey> การทำให้ใช้งานได้จะล้มเหลว
|
build |
EmptyElementForKeyConfiguration |
หากแอตทริบิวต์ ref ขององค์ประกอบย่อย <Value> ขององค์ประกอบ <PrivateKey> หรือ <SecretKey> ว่างเปล่าหรือไม่ได้ระบุ การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidConfigurationForVerify |
ข้อผิดพลาดนี้เกิดขึ้นหากกำหนดองค์ประกอบ <Id> ไว้ภายในองค์ประกอบ <SecretKey>
|
build |
InvalidEmptyElement |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Source> ของนโยบาย "ยืนยัน JWT" ว่างเปล่า หากมี จะต้องกำหนดด้วยชื่อตัวแปรโฟลว์ Edge
|
build |
InvalidPublicKeyValue |
หากค่าที่ใช้ในองค์ประกอบย่อย <JWKS> ขององค์ประกอบ <PublicKey> ไม่ได้ใช้รูปแบบที่ถูกต้องตามที่ระบุไว้ใน RFC 7517 การทำให้ใช้งานได้จะล้มเหลว
|
build |
InvalidConfigurationForActionAndAlgorithm |
หากใช้องค์ประกอบ <PrivateKey> กับอัลกอริทึม HS Family หรือมีการใช้องค์ประกอบ <SecretKey> กับอัลกอริทึม Family ของ RSA การทำให้ใช้งานได้จะล้มเหลว
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "TokenExpired" |
JWT.failed |
นโยบาย JWT ทั้งหมดตั้งค่าตัวแปรเดียวกันในกรณีที่ดำเนินการไม่สำเร็จ | JWT.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
สำหรับการจัดการข้อผิดพลาด แนวทางปฏิบัติแนะนำคือให้ดักจับส่วน errorcode
ของข้อผิดพลาด
คำตอบ อย่าพึ่งพาข้อความใน faultstring
เนื่องจากอาจมีการเปลี่ยนแปลง
ตัวอย่างกฎข้อผิดพลาด
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
นโยบาย XMLThreatProtection
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.xmlthreatprotection.ExecutionFailed |
500 | นโยบาย XMLThreatProtection สามารถแสดงข้อผิดพลาด ExecutionFailed หลายประเภท ข้อผิดพลาดเหล่านี้ส่วนใหญ่เกิดขึ้นเมื่อเกินเกณฑ์ที่กำหนดไว้ในนโยบาย เหล่านี้ ประเภทของข้อผิดพลาดมีดังนี้ ความยาวของชื่อองค์ประกอบ จำนวนย่อย ความลึกของโหนด จำนวนแอตทริบิวต์ ความยาวของชื่อแอตทริบิวต์ และอื่นๆ อีกมากมาย คุณสามารถดูรายการทั้งหมดได้ในหัวข้อการแก้ปัญหาข้อผิดพลาดเกี่ยวกับรันไทม์ของนโยบาย XMLThreatProtection | build |
steps.xmlthreatprotection.InvalidXMLPayload |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection ไม่ใช่เอกสาร XML ที่ถูกต้อง
|
build |
steps.xmlthreatprotection.SourceUnavailable |
500 |
ข้อผิดพลาดนี้จะเกิดขึ้นหากข้อความ
ตัวแปรที่ระบุในองค์ประกอบ <Source> มีดังนี้
|
build |
steps.xmlthreatprotection.NonMessageVariable |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Source> ได้รับการตั้งค่าเป็นตัวแปรที่
ไม่ใช่ประเภท
message
|
build |
หมายเหตุ
- ชื่อข้อผิดพลาด ExecutionFailed คือชื่อข้อผิดพลาดเริ่มต้น และระบบจะส่งคืนโดยไม่คำนึงถึง ประเภทข้อผิดพลาดที่ตรวจพบ อย่างไรก็ตาม ค่าเริ่มต้นนี้สามารถเปลี่ยนได้โดย พร็อพเพอร์ตี้ระดับองค์กร เมื่อตั้งค่าพร็อพเพอร์ตี้นี้ ชื่อข้อผิดพลาดจะแสดงตามจริง เช่น "TextExceeded" หรือ "AttrValueExceeded" โปรดดูหมายเหตุการใช้งานสำหรับ รายละเอียด
- สถานะ HTTP 500 เป็นค่าเริ่มต้น แต่สถานะ HTTP สามารถเปลี่ยนเป็น 400 ได้สำหรับ ขอข้อผิดพลาดของโฟลว์โดยการตั้งค่าพร็อพเพอร์ตี้ระดับองค์กร โปรดดูหมายเหตุการใช้งานสำหรับ รายละเอียด
ข้อผิดพลาดในการทำให้ใช้งานได้
ไม่มี
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name Matches "SourceUnavailable" |
xmlattack.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | xmlattack.XPT-SecureRequest.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "XMLThreatProtection[XPT-SecureRequest]: Execution failed. reason: XMLThreatProtection[XTP-SecureRequest]: Exceeded object entry name length at line 2", "detail": { "errorcode": "steps.xmlthreatprotection.ExecutionFailed" } } }
ตัวอย่างกฎข้อผิดพลาด
<FaultRule name="XML Threat Protection Policy Faults"> <Step> <Name>AM-CustomErrorResponse</Name> <Condition>(fault.name Matches "ExecutionFailed") </Condition> </Step> <Condition>(xmlattack.XPT-SecureRequest.failed = true) </Condition> </FaultRule>
นโยบาย XMLtoJSON
ส่วนนี้จะอธิบายรหัสข้อผิดพลาดและข้อความแสดงข้อผิดพลาดที่แสดงกลับมา และตัวแปรข้อผิดพลาดที่ Edge ตั้งค่าไว้เมื่อนโยบายนี้ทริกเกอร์ข้อผิดพลาด ข้อมูลนี้มีความสำคัญต่อการทราบว่าคุณจะสร้างกฎความผิดพลาดเพื่อ จัดการกับข้อผิดพลาด หากต้องการเรียนรู้เพิ่มเติม โปรดดูที่สิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการ ข้อผิดพลาด
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.xmltojson.ExecutionFailed |
500 | ข้อผิดพลาดนี้เกิดขึ้นเมื่อเพย์โหลดอินพุต (XML) ว่างเปล่า หรือ XML อินพุตไม่ถูกต้องหรือผิดรูปแบบ | build |
steps.xmltojson.InCompatibleType |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากประเภทตัวแปรที่กำหนดไว้ในองค์ประกอบ <Source> และ
องค์ประกอบ <OutputVariable> ไม่เหมือนกัน ซึ่งจำเป็นต้องมีประเภทของตัวแปร
ที่มีอยู่ภายในองค์ประกอบ <Source> และองค์ประกอบ <OutputVariable> ตรงกัน
|
build |
steps.xmltojson.InvalidSourceType |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากประเภทของตัวแปรที่ใช้กำหนดองค์ประกอบ <Source> คือ
ไม่ถูกต้อง ประเภทตัวแปรที่ถูกต้องคือ ข้อความและสตริง |
build |
steps.xmltojson.OutputVariableIsNotAvailable |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากตัวแปรที่ระบุในองค์ประกอบ <Source> ของ XML ถึง
นโยบาย JSON เป็นสตริงประเภทและไม่ได้กำหนดองค์ประกอบ <OutputVariable>
องค์ประกอบ <OutputVariable> เป็นข้อมูลที่ต้องระบุเมื่อตัวแปรที่กำหนดไว้ใน <Source>
จัดอยู่ในประเภทสตริง |
build |
steps.xmltojson.SourceUnavailable |
500 |
ข้อผิดพลาดนี้จะเกิดขึ้นหากข้อความ
ตัวแปรที่ระบุในองค์ประกอบ <Source> ของนโยบาย XML เป็น JSON มีดังนี้
|
build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
EitherOptionOrFormat |
หากองค์ประกอบใดองค์ประกอบหนึ่ง <Options> หรือ <Format> ไม่ใช่
ที่ประกาศไว้ในนโยบาย XML เป็น JSON การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลว
|
build |
UnknownFormat |
หากองค์ประกอบ <Format> ภายในนโยบาย XML เป็น JSON มีข้อมูลที่ไม่รู้จัก
กำหนดไว้ การทำให้พร็อกซี API ใช้งานได้ล้มเหลว รูปแบบที่กำหนดไว้ล่วงหน้าได้แก่
xml.com , yahoo , google และ badgerFish
|
build |
ตัวแปรความผิดพลาด
ระบบจะตั้งค่าตัวแปรเหล่านี้เมื่อเกิดข้อผิดพลาดรันไทม์ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อสิ่งที่คุณจำเป็นต้องทราบ เกี่ยวกับข้อผิดพลาดของนโยบาย
ตัวแปร | สถานที่ | ตัวอย่าง |
---|---|---|
fault.name="fault_name" |
fault_name คือชื่อของข้อผิดพลาดตามที่ระบุไว้ในตารางข้อผิดพลาดรันไทม์ด้านบน ชื่อข้อผิดพลาดคือส่วนสุดท้ายของรหัสข้อผิดพลาด | fault.name = "SourceUnavailable" |
xmltojson.policy_name.failed |
policy_name คือชื่อที่ผู้ใช้ระบุของนโยบายที่เป็นสาเหตุของข้อผิดพลาด | xmltojson.XMLtoJSON-1.failed = true |
ตัวอย่างการตอบสนองข้อผิดพลาด
{ "fault": { "faultstring": "XMLToJSON[XMLtoJSON-1]: Source xyz is not available", "detail": { "errorcode": "steps.xml2json.SourceUnavailable" } } }
ตัวอย่างกฎข้อผิดพลาด
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="XML to JSON Faults"> <Step> <Name>AM-SourceUnavailableMessage</Name> <Condition>(fault.name Matches "SourceUnavailable") </Condition> </Step> <Step> <Name>AM-BadXML</Name> <Condition>(fault.name = "ExecutionFailed")</Condition> </Step> <Condition>(xmltojson.XMLtoJSON-1.failed = true) </Condition> </FaultRule>
นโยบาย XSLTransform
ข้อผิดพลาดเกี่ยวกับรันไทม์
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อนโยบายทำงาน
รหัสข้อผิดพลาด | สถานะ HTTP | สาเหตุ | แก้ไข |
---|---|---|---|
steps.xsl.XSLSourceMessageNotAvailable |
500 |
ข้อผิดพลาดนี้เกิดขึ้นหากข้อความหรือตัวแปรสตริงที่ระบุในองค์ประกอบ <Source> ของนโยบายการแปลง XSL อยู่นอกขอบเขต (ใช้ไม่ได้ในขั้นตอนเฉพาะเจาะจงที่มีการใช้นโยบาย) หรือจับคู่ไม่ได้ (ไม่ได้กำหนดไว้)
|
build |
steps.xsl.XSLEvaluationFailed |
500 | ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลด XML ของอินพุตไม่พร้อมใช้งาน/มีรูปแบบไม่ถูกต้อง หรือนโยบาย XSLTransform ล้มเหลว/เปลี่ยนรูปแบบไฟล์ XML อินพุตตามกฎการเปลี่ยนรูปแบบที่ระบุไว้ในไฟล์ XSL ไม่ได้ อาจมีสาเหตุหลายประการที่ทำให้นโยบาย XSLTransform ล้มเหลว สาเหตุที่ข้อความแสดงข้อผิดพลาดล้มเหลวจะให้ข้อมูลเพิ่มเติมเกี่ยวกับสาเหตุ | build |
ข้อผิดพลาดในการทำให้ใช้งานได้
ข้อผิดพลาดเหล่านี้อาจเกิดขึ้นเมื่อคุณใช้พร็อกซีที่มีนโยบายนี้
ชื่อข้อผิดพลาด | สาเหตุ | แก้ไข |
---|---|---|
XSLEmptyResourceUrl |
ถ้าองค์ประกอบ <ResourceURL> ในนโยบายการแปลง XSL ว่างเปล่า จะทำให้ใช้งานพร็อกซี API ไม่สำเร็จ |
build |
XSLInvalidResourceType |
หากประเภททรัพยากรที่ระบุในองค์ประกอบ <ResourceURL> ของนโยบายการแปลง XSL ไม่ใช่ประเภท xsl การทำให้พร็อกซี API ใช้งานได้จะไม่สำเร็จ |
build |