Bugfix: Return error on PutRecord

Return the actual error rather than a json unmarshaling error