algoliax icon indicating copy to clipboard operation
algoliax copied to clipboard

clarify env var precedence over config value

Open foohonpie opened this issue 1 year ago • 0 comments

Environment

  • Elixir version (elixir -v): Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns] Elixir 1.15.7 (compiled with Erlang/OTP 24)

  • Algoliax version (mix deps): algoliax 0.7.1 (Hex package) (mix) locked at 0.7.1 (algoliax) 399f76a4

The readme says:

Configuration

Algoliax needs only :api_key and :application_id config. These configs can either be on config files or using environment variables ALGOLIA_API_KEY and ALGOLIA_APPLICATION_ID.

However, it isn't clear that env var takes precedence. This can lead to confusion when testing different values in config; a mismatch can occur which would lead to an "403 : Invalid Application-ID or API key" error, the cause of which isn't immediately obvious.

This isn't a bug, but it would be helpful to note the precedence in the readme.

foohonpie avatar Jul 11 '24 05:07 foohonpie