Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18312

DoTry and DoCatch block does not work in YAML DSL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.17.0
    • None
    • came-core
    • None
    •       <camel.version>3.17.0</camel.version>
            <quarkus.platform.version>2.10.1.Final</quarkus.platform.version>
       

    • Unknown

    Description

      The DoTry and DoCatch block does not work and this is an important feature for us to catch errors and process. 

       Is there an existing example which works ? Not sure if the syntax is missing anything but its not working as per specs. 

      Any working example or logic will help analyze. This may relate to the same issue as below. 

          https://github.com/apache/camel-karavan/issues/401

      Example Snippet which does not work under Quarkus and Spring Boot is as follows. We are using Karavan for citizen development. 

                      - doTry:
                          steps:
                            - to:
                                uri: rest:post:example:startProcess
                                parameters:
                                  host: localhost:8081
                                  bindingMode: auto
                                  producerComponentName: http
                          doCatch:
                            - steps:
                                - log:
                                    message: Exception while calling the process \n${body}
                                    loggingLevel: ERROR
                              exception:
                                - java.lang.Exception.class
                                - Exception.class
       

      Please  help. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ashishgidh Ashish Gidh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: