[Serializer] error handling inconsistencies fixed in the serializer decoders

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #9393
| License       | MIT
| Doc PR        | none

see #9586 for the original PR