# Not found exception

**URL:** <https://discourse.rom-rb.org/t/not-found-exception/263>\
**Category:** Usage Stories\
**Created:** [June 30, 2018, 2:48pm UTC](https://discourse.rom-rb.org/t/not-found-exception/263 "2018-06-30T14:48:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![calin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/calin/32/103_2.png) [@calin](https://discourse.rom-rb.org/u/calin)\
**Post date:** [June 30, 2018, 2:48pm UTC](https://discourse.rom-rb.org/t/not-found-exception/263/1 "2018-06-30T14:48:03Z")

</div>

I need to show a 404 page when the record is not found, using `one!` I will get a `ROM::TupleCountMismatchError` exception.

I expected something along the lines `RecordNotFound` as an exception is there a better way to do this?

---

<div class="post-metadata">

**Author:** ![flash-gordon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/flash-gordon/32/186_2.png) [@flash-gordon](https://discourse.rom-rb.org/u/flash-gordon)\
**Post date:** [July 1, 2018, 9:02am UTC](https://discourse.rom-rb.org/t/not-found-exception/263/2 "2018-07-01T09:02:05Z")

</div>

`one!` is a more strict requirement, it throws an error in case there is more than one row in the result set, hence more generic `TupleCountMismatchError` name. Of course, it doesn’t matter if you’re filtering by PK but it useful for other cases. FWIW, I wouldn’t use exceptions for this purpose but it’s a matter of taste, I guess. `one!` has a non-strict counterpart called `one`. Note it also throws an exception if there’s more than one row returned.
