Resolved an issue that ESI is overwritten
If the primaryKey does not exist, modified to display an error message to that effect.