DRY up decoding exceptions, and use ex-info for it.