To make this easier to read, invert it.

error.code == 0 ? .... : error.code