[v4] How to throw an error in a lifecycle hook?

that did the trick! thank you very much