# Dry-transaction: Better error for a missing step

**URL:** <https://discourse.dry-rb.org/t/dry-transaction-better-error-for-a-missing-step/363>\
**Category:** Ideas\
**Created:** [October 12, 2017, 4:33pm UTC](https://discourse.dry-rb.org/t/dry-transaction-better-error-for-a-missing-step/363 "2017-10-12T16:33:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fenec](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@fenec](https://discourse.dry-rb.org/u/fenec)\
**Post date:** [October 12, 2017, 4:33pm UTC](https://discourse.dry-rb.org/t/dry-transaction-better-error-for-a-missing-step/363/1 "2017-10-12T16:33:27Z")

</div>

If I don’t describe a step, I get: `NameError: undefined method call for class NilClass`

because `method(:call)` in `#arity` is called on nil:

> <https://github.com/dry-rb/dry-transaction/blob/v0.10.2/lib/dry/transaction/step.rb#L59>

I think, would be better to raise a more descriptive error in this case.

---

<div class="post-metadata">

**Author:** ![GustavoCaso](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/gustavocaso/32/86_2.png) [@GustavoCaso](https://discourse.dry-rb.org/u/GustavoCaso)\
**Post date:** [October 13, 2017, 1:04pm UTC](https://discourse.dry-rb.org/t/dry-transaction-better-error-for-a-missing-step/363/2 "2017-10-13T13:04:42Z")

</div>

@fenec what do you mean when you do “not describe a step”.

Is missing from the container or no method is defined in the class?

---

<div class="post-metadata">

**Author:** ![fenec](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@fenec](https://discourse.dry-rb.org/u/fenec)\
**Post date:** [October 14, 2017, 4:51am UTC](https://discourse.dry-rb.org/t/dry-transaction-better-error-for-a-missing-step/363/3 "2017-10-14T04:51:04Z")

</div>

method is not defined in the class
