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

REST-DSL - Producer fails with NPE or other exceptions if you have not set a hostname

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.19.0
    • Fix Version/s: 2.19.1, 2.20.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      If you forget to configure a host name then the rest producer fails with different errors if you use http4, netty4-http, undertow etc.

      We should likely add some validation logic in the rest endpoint / rest producer so it can detect this missing configuration and report this in the same way.

      You can reproduce from this example by removing host at
      https://github.com/apache/camel/blob/master/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java#L33

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                davsclaus Claus Ibsen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: