Is it the Carrera with the Suntour hub motor?
If so, there are lots of reports of cutting out problems which have proved hard to fix.
Which is a pity, because the bike rides nicely.
The Suntour system has been around a few years now, and it may be reliability has been improved.