Add an error if the source or target are not set