Reputation: 539
In my app.config file there is a property like:
enable-toggle-prop {
update-toggle-enabled=false
}
The file where I am parsing looks like this:
import pureconfig._
import pureconfig.generic.auto._
case class MyConfig(updateToggleEnabled: Boolean)
object MyConfig {
val config: MyConfig = {
val parseConfig = ConfigSource.default.at("enable-toggle-prop").load[MyConfig]
config match {
case Left(error) => //Throwing Illegal Argument exception
case Right(parsedConf) => parsedConf
}
}
When I am trying to deploy the app I am running into IllegalArgumentException saying "Configuration is Invalid: ConfigReaderFailure(CovertFailure(WrongType(String, Set(Boolean))))..." Why is it not able to convert Boolean? Is there anything I am missing here? TIA
Upvotes: 1
Views: 233