handle decode errors
Merge remote-tracking branch 'origin/wip-server-protocol' into wip-server-functionality