Giter VIP home page Giter VIP logo

edge-shared-errorhandling-flow-example's Introduction

edge-shared-errorhandling-flow-example

Details how to use shared flows for establishing a common error handling routine for all proxies.

Shared Flow

  1. Zip the "sharedflowbundle" folder
  2. Upload as a Shared Flow (APIs-->Shared Flows)
  3. Deploy to environment needed
  4. Customize to add additional error codes, error handling, logging, etc

Example Proxy

  1. Zip the "apiproxy"
  2. Upload the proxy
  3. Deploy to environment needed

Test

  1. Import "errorhandlingexample-sharedflow-proxy-v1.postman_collection.json" into Postman
  2. Run calls to see response

Proxy Template With Shared Flow Reference

  1. This is the proxy template (referenced here: https://github.com/davidmehi/edge-proxy-template) that now uses the shared flow for common error handling.

To use the Shared Flow in a proxy:

  1. Add the shared flow "SharedFlow_FaultRulesHanding" using the Shared Flow policy to the proxy.
  2. Add the policy to the <FaultRules> and the <DefaultFaultRule> in the default.xml of the proxy. In both cases, the shared flow will be called, which contains the common error handling logic.
    <FaultRules>
        <FaultRule name="Shared Fault Rules">
            <Step>
                <Name>FlowCalloutFaultRulesHandling</Name>
            </Step>
        </FaultRule>
        <!-- could put additional fault rules here if needed -->
    </FaultRules>
    <DefaultFaultRule name="all">
        <AlwaysEnforce>true</AlwaysEnforce>
        <Step>
            <Name>FlowCalloutFaultRulesHandling</Name>
        </Step>
    </DefaultFaultRule>

edge-shared-errorhandling-flow-example's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.