Fail fast when misconfigured 🧨 (#442)

This commit is contained in:
De Wet Blomerus 2023-09-28 10:27:22 -04:00 committed by GitHub
parent 04a773ec27
commit 857aaa3f1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,8 +80,9 @@ defmodule MyApp.Secrets do
defp get_config(key) do
:my_app
|> Application.get_env(:auth0, [])
|> Keyword.fetch(key)
|> Application.fetch_env!(:auth0)
|> Keyword.fetch!(key)
|> then(&{:ok, &1})
end
end
```