TEIID-3177 improving error message and adding a test