This can be reverted. At one point I thought I could use assert.throws but it is not good enough. No way to get to the error object.