Simplify: remove custom exception and redundant realm passing