The problem is that "err" is a generic message, and it is conclusively known to represent more than one underlying problem, even on a single model. One thing that I am certain that it represents - in the abstract - is a shutter error, usually but not always due to drifting timing. That isn't something you can fix, but fortunately it's probably covered under Nikon warranty as it isn't a usage error. On the other hand, Err also is what happens if you drop the camera and cause the shutter to get out of square, and that is NOT covered by warranty!
In addition there are likely at least ten or twelve other circumstances, some common and some not, that produce the same "diagnostic."
The recurring nature of this problem on your camera does sound like it's going to need a trip to Nikon.
_____ Brian... a bicoastal Nikonian and Team Member
My gallery is online. Comments and critique welcomed any time!