I have a extension and when I call this extension with an ID of a record that not or no longer exists I get an Exception `Object of type My\Model\... with identity "1035" not found.`

The page itself got the header status 500.

What I would like to do in this case is to show my default 404 page. Is this possible? And how can I do that?