apache / camel-karavan

Apache Camel Karavan a Low-code Data Integration Platform
https://camel.apache.org
Apache License 2.0
452 stars 156 forks source link

Better error mesage for unset GIT parameters #1222

Open mgubaidullin opened 7 months ago

mgubaidullin commented 7 months ago

If user did not set karavan.git.XXX parameters application should better managed situation and log it

    ... 10 more
Caused by: io.quarkus.runtime.configuration.ConfigurationException: Failed to load config value of type class java.lang.String for: karavan.git.repository
        ... 9 more
        at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:60)
        at io.smallrye.config.inject.ConfigProducerUtil.getValue(ConfigProducerUtil.java:100)
        at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:371)
    Suppressed: java.util.NoSuchElementException: SRCFG00040: The config property karavan.git.repository is defined as the empty String ("") which the following Converter considered to be null: io.smallrye.config.Converters$BuiltInConverter
    ... 7 more
    at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigValues1665125174.deploy(Unknown Source)
    at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigValues1665125174.deploy_0(Unknown Source)
    at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:70)
Caused by: jakarta.enterprise.inject.spi.DeploymentException: io.quarkus.runtime.configuration.ConfigurationException: Failed to load config value of type class java.lang.String for: karavan.git.repository

better to wrap it with try...catch with giving a meaninful error message.

Originally posted by @vebera in https://github.com/apache/camel-karavan/issues/1164#issuecomment-2047147824