Fix error handling

In some cases our code throws Amazon DynamoDB specific
exceptions even we work with REST API.

Closes-bug: #1373955

Change-Id: I253e9d4287fb8ab5e5604df7ba00b99b37920409
Merge "Fix error handling"