dbt-labs / dbt-labs/docs.getdbt.com
[Core] Explain `warn_error_options` vs. `warn_error`
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Link to the page(s) on docs.getdbt.com requiring updates
https://docs.getdbt.com/reference/global-configs/warnings
### Tell us more about this update
We can do a better job of clearly communicating the differences between `WARN_ERROR` and `WARN_ERROR_OPTIONS` and when to use each. Also in communicating that they are mutually exclusive (but very similar).
A few suggestions:
1. It would have helped me if this were much earlier in the page:
1. These two are equivalent and show how `warn_error` can be converted to `warn_error_options` -- we should give an example of this!
```
dbt --warn-error test
dbt --warn-error-options '{"error": "all"}' test
```
1. Explain the trade-offs between `warn_error` and `warn_error_options`. The former is shorter to write (especially as a CLI arg) while the latter is very verbose but allows for silencing warnings you want to ignore.
1. Maybe we suggest _always_ using `warn_error_options` instead of `warn_error`?!
1. Alternatively, consider `warn_error` just shorthand / a special case of `warn_error_options` where nothing is silenced and everything is an error.
Enhancement idea for dbt-core: instead of making `warn_error` and `warn_error_options` mutually exclusive, just favor `warn_error_options` over `warn_error` whenever both are provided.
### Reviewers/Stakeholders/SMEs
.
### Related GitHub issues
https://github.com/dbt-labs/dbt-core/issues/10274#issuecomment-2155582205
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.