{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
1
Question by Anil Sagar @ Google · Sep 02, 2015 at 10:04 AM · 230 Views apigee edgefaultrulesdocsfault

Can we use faultrules tag in policies ?

Fault Handling documentation here says that fault rules can be attached to proxy or target default end points.
Attach fault rules to the following entities in an API proxy configuration: ProxyEndpoint: Enables fault handling for all errors that occur in the ProxyEndpoint request and response flows. TargetEndpoint: Enables fault handling for all errors that occur in the TargetEndpoint request and response flows.
It doesn't talk about attaching same to policies. Policy individual pages also doesn't talk about same explicitly. Check right side bar for tags in below example. But, Some of the examples in policy pages use same for example here,
 <LookupCache async="false" continueOnError="false" enabled="true" name="Lookup-Cache-1">
    <DisplayName>Lookup Cache 1</DisplayName>
    <FaultRules/>
    <Properties/>
    <CacheKey>
        <Prefix/>
        <KeyFragment ref=""/>
    </CacheKey>
    <!-- Omit this element if you're using the included shared cache. -->
    <CacheResource/>
    <Scope>Exclusive</Scope>
    <AssignTo>flowVar</AssignTo>
</LookupCache>
Is it a doc issue or fault rules are not supported on policies ? Cheers, Anil Sagar
screen-shot-2015-09-02-at-32939-pm.png (440.6 kB)
Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sujit Kaky · Jan 07, 2018 at 02:14 PM 0
Link

How about the FaultRules in each Step?

As per document I see FaultRules tag can be attached at the Step level. if a <FaultRules/> tag is present in the step, Apigee does not mind saving.

Good Example:

            <Step>
                <FaultRules/>
                <Name>RaiseFault_fault500</Name>
                <Condition>(request.queryparam.fault500 == "true")</Condition>
            </Step>

However, the following gives an error

            <Step>
                <FaultRules>
                    <FaultRule name="default">
                        <Step>
                           <Name>set400error</Name>
                        </Step>
                        <Condition>error.status.code == 500</Condition>
                    </FaultRule>
                </FaultRules>
                <Name>RaiseFault_fault500</Name>
                <Condition>(request.queryparam.fault500 == "true")</Condition>
            </Step>

Please confirm if my understanding is correct?

Close

2 Answers

  • Sort: 
avatar image
2
Best Answer

Answer by gnanasekaran · Sep 02, 2015 at 01:36 PM

Today, FaultRules are not supported at the policy level, but only at the Endpoint level The policy schema contains a FaultRules element, but it is not used [might be in future]. We need to update the document to reflect this, Thanks,
Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Sep 02, 2015 at 03:28 PM 0
Link
Thank you @Mukundha Madhavan for details. It helps. We need to update individual policy doc pages to avoid confusion.
avatar image
2
Best Answer

Answer by sgilson · Sep 02, 2015 at 01:48 PM

I added this note to the doc on fault rules: "When you create a policy in the Edge UI, it includes a <FaultRules/> tag. However, fault rules cannot be attached to individual policies at this time." Stephen
Comment
Add comment Show 3 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Sep 02, 2015 at 03:12 PM 0
Link
@sgilson , Thank you for quick action. Can we also remove it from examples in individual policy pages ? For Example, here.
avatar image sgilson ♦♦ Anil Sagar @ Google ♦♦ · Sep 02, 2015 at 04:10 PM 0
Link
All set - it looks like all 4 cache policies listed that tag, but no other policies did. I have removed it from the caching policies. Stephen
avatar image Anil Sagar @ Google ♦♦ sgilson ♦♦   · Sep 02, 2015 at 04:26 PM 0
Link
Awesome, Thank you @sgilson

Follow this Question

Answers Answers and Comments

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Requested output structure for the APIs - create a debug session, delete a debug session and get data for a session 2 Answers

Default Fault Rule not working 2 Answers

Policy Fault Handling 4 Answers

How to intimate error occurred without using the raise fault policy? 3 Answers

Policy Guidelines for specific use cases 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges