Expose more errors.

Decoding errors are now exposed as `Err...` variables so applications can check for them.
I think this could be an error value as well, we don't need to write value in to the message.