I don't have a D8xx body, but there have been 2 times when ERR displayed on the top screen. One was when the shutter or mirror on my D750 would stick and the viewfinder image turned black. A second press of the shutter cleared it. The other time was when using an AF-D lens with a different body. The lens has to be locked at the smallest aperture with the aperture ring. If the aperture ring changes, then ERR shows up.
Does the body work normally when a lens is attached? It's possible the contacts on the body have an issue. Did you remove the body cap and look around the opening for any type of dust or debris that might be present?