Fixed typo in error message
Changed mutation from update to upsert

This allows to pass a key id or name for an entity that is not already existing.