More accurate error reporting during key manipulation failures