Assume that G=(V,E) is a simple undirected graph, and C is a nonempty subset of V. For every v∈V, we denote Ir(v)={u∈C|dG(u,v)⩽r}, where dG(u,v) denotes the number of edges on any shortest path between u and v. If the sets Ir(v) for v∈V are pairwise different, and none of them is the empty set, we say that C is an r-identifying code in G. If C is r-identifying in every graph G′ that can be obtained by adding and deleting edges in such a way that the number of additions and deletions together is at most t, the code C is called t-edge-robust. Let K be the graph with vertex set Z2 in which two different vertices are adjacent if their Euclidean distance is at most 2. We show that the smallest possible density of a 3-edge-robust code in K is r+12r+1 for all r>2.