Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Mar 22, 2023
1 parent 1160c4b commit 450cd52
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import com.sksamuel.hoplite.ConfigResult
import com.sksamuel.hoplite.Node
import com.sksamuel.hoplite.PropertySource
import com.sksamuel.hoplite.PropertySourceContext
import com.sksamuel.hoplite.fp.invalid
import com.sksamuel.hoplite.fp.valid
import com.sksamuel.hoplite.decoder.toValidated
import com.sksamuel.hoplite.parsers.toNode
import java.util.Properties

Expand Down Expand Up @@ -54,11 +53,8 @@ class ParameterStorePathPropertySource(
props[name.removePrefix("/")] = it.value
}
props.toNode("aws_parameter_store at $prefix", "/")
}.fold(
{ it.valid() },
{
ConfigFailure.PropertySourceFailure("Could not fetch data from AWS parameter store: ${it.message}").invalid()
}
)
}.toValidated {
ConfigFailure.PropertySourceFailure("Could not fetch data from AWS parameter store: ${it.message}", it)
}
}
}

0 comments on commit 450cd52

Please sign in to comment.