Properly treat `error` as an interface type.

Closes #1057