# Raising errors on deprecations

**URL:** <https://discourse.dry-rb.org/t/raising-errors-on-deprecations/1698>\
**Category:** dry-types\
**Created:** [June 30, 2023, 1:14am UTC](https://discourse.dry-rb.org/t/raising-errors-on-deprecations/1698 "2023-06-30T01:14:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sporto](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/sporto/32/893_2.png) [@sporto](https://discourse.dry-rb.org/u/sporto)\
**Post date:** [June 30, 2023, 1:14am UTC](https://discourse.dry-rb.org/t/raising-errors-on-deprecations/1698/1 "2023-06-30T01:14:40Z")

</div>

When using IRB or running tests I see dry-types deprecation messages.  
I would like to find all the places where we have to fix deprecations.

What I would like is to have our CI raise errors when we use deprecated patterns. So I can find them and fix them.

Is there some config I can set so deprecations will be raised as errors, instead of warnings?

Thanks

---

<div class="post-metadata">

**Author:** ![flash-gordon](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/flash-gordon/32/494_2.png) [@flash-gordon](https://discourse.dry-rb.org/u/flash-gordon)\
**Post date:** [July 2, 2023, 10:58am UTC](https://discourse.dry-rb.org/t/raising-errors-on-deprecations/1698/2 "2023-07-02T10:58:02Z")

</div>

Something like this will do:

```ruby
def (Dry::Core::Deprecations.logger).warn(string)
  if string.include?('dry-types')
    raise string
  else
    super
  end
end

```

---

<div class="post-metadata">

**Author:** ![sporto](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/sporto/32/893_2.png) [@sporto](https://discourse.dry-rb.org/u/sporto)\
**Post date:** [July 4, 2023, 10:33pm UTC](https://discourse.dry-rb.org/t/raising-errors-on-deprecations/1698/3 "2023-07-04T22:33:21Z")

</div>

Great, thank you
