If the minimal distance of a code C is equal to d, then any word differing in at most d-1 positions from a code word w, is either that code word itself, or not a code word. Therefore minimal distance d implies perfect detection of at most d-1 errors.
If d > 2e, it is possible to correct e errors. Indeed, using the triangle inequality we find that a word v at distance at most e from a code word w, has distance > e to any code word differing from w.