dashbitco / nimble_options

A tiny library for validating and documenting high-level options. 💽
Apache License 2.0
507 stars 38 forks source link

Better error message for duplicated key #83

Closed shutangyu closed 2 years ago

shutangyu commented 2 years ago

https://hexdocs.pm/finch/Finch.html#start_link/1-pool-configuration-options

** (EXIT) an exception was raised:
        ** (NimbleOptions.ValidationError) unknown options [:size], valid options are: [:protocol, :size, :count, :max_idle_time, :conn_opts, :pool_max_idle_time, :conn_max_idle_time]
            (finch 0.12.0) lib/finch.ex:145: anonymous fn/2 in Finch.pool_options!/1

unknown options [:size], valid options are: [:protocol, :size, ....] looks not so obvious

josevalim commented 2 years ago

A pull request is welcome!

whatyouhide commented 2 years ago

Closing and not implementing, see the comment in #84. 👋