Fix catching wrong exception in EntityContentDataCodec

Change-Id: Ie27a3e8537a2cb6111654e8c0e970dc5fb8e5995