Fix crash when DynamoDB returns a non-json error