If this is the contract of the resource, shouldn't this be in the `resource.fail` method then? Or maybe `log_exception`. OTOH those, I think, are just mixed in logging methods. So in that case maybe this would be better done by putting a new method on `resource` (or something else that should have that responsibility)?

What I'm looking for is how to take care of the comment that says that this contract is "implicit" and make that contract more explicit.