Not found exception

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?

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.