better exceptions raised on client