2 - APIM - Development - Policy Studio - Lab - Error management
2 - APIM - Development - Policy Studio - Lab - Error management
#axway
Welcome To Our Presentation
Policy Studio - Lab - Error management
Our Goals • Put theory into practice after Error management Policy
Studio module
2
Welcome To Our Presentation
Policy Studio - Lab - Error management
3
Practice : error
management
4
Billing REST error management
• Only correct processing is done in restified service Billing
5
Billing SOAP Service
Error management
Company boundaries
Shipping Shipping
Partner Mockup
Billing
Consumers
OMS
REST
API Management Developer
Infrastructure
Error : wrong parameter
6
Solution
7
Default Error attributes
• Go to BillingRest policy
• Create 2 attributes
• error.message Request failed
• error.http.code 500
8
Default Error attributes
9
Validation Error attributes
• Add another “Copy / Modify
attributes” (or copy it)
• Create 2 attributes
• error.message Validation
failed
• error.http.code 500
10
Connection Error attributes
• Add another “Copy / Modify
attributes” (or copy it)
• Create 2 attributes
• error.message :
Service not available
• error.http.code : 500
11
False filter
• Add a “False” filter
12
Set Error message
• Create a new policy “BillingRestFaultHandler” in same container
• Set start
13
Fault Handler
• Add “BillingRestFaultHandler” in
“BillingRest”
• Set “BillingRestFaultHandler” as
Fault Handler (right-click on it)
• Test it!
14
Test
15
Remarks
• Notice there are still some filters having “End” tag
• So default error notification will be triggered
• “Connect to URL” failure path will be triggered only if service cannot be reached,
not for http code different of 200
• Adding accurate error management can be an important part of policy size (like
in any program)
16
Wrap-up
17
Wrap-up
• Of course, implementation starts by doing something working
• But there often few correct paths, for many incorrect. Take care of this topic
from the beginning
• Leverage Failure path, Fault Handler and Transaction Audit to take care of it
18
Thank you!
19