Is `TraitError` the right thing to raise for errors in this method?  Do we do this elsewhere rather than just letting it raise the underlying exception?