Avoid use of 'error'

Switch to Either instead (already using it in most places anyway).