why does my printer all of a sudden show an error and tells
me that it is disconnected and stops printing mid way.
Try to switch the power off and unplug it. wait for a while, then switch it back on and try again. If the problem continues, send it back to the store where you had purchased it, use the warranty if you still have it.