Sound badly assembled, so warranty job if its brand new. Take it back to the shop, and get them to shorten the hose while they fix it just to make sure.
Either way, send it back, before you take it apart or you might lose out on warranty.
Sometimes the olives dont seat squarely, usually nippingthem up a bit more sorts it, but youre shortening the hose anyway.
You could check the caliper where the hose nut screws into to make sure theres no swarf in the hole.
The other day I got some spangly new M615s. One of them is fine but the other one has a leak. If I pull the lever and hold it, after a few seconds fluid starts to appear around the exposed threads of the hose connector at the lever end. If I hold the brake on the lever goes back to the bar.
…the hose is too long and I need to shorten it. Should I take a chance and assume the leak is from a badly fitted connector that I’m going to cut off anyway or simply send the brake back?
A friend had a similar problem last weekend on his Deores. We all thought it was the nut/olive junction but turned out the reservoir cover was very slightly loose (nothing noticeable) and fluid was leaking around the lid.