Instead of asserting, can you make it set `*error` ?