tests for error cases
catch decoding error, and emit it safely