Add tests for errors in relations