I feel bad for you but worse for who ever bought these if it was internally matched(some would may also call it a dark pool)(also explained further below why this was not on an exchange), here's why:

Whoever was internally matched got a benefit(alleged profit) of $339.93 on their partial fill; assuming they would have sold it immediately at the high for 216.69% ROI and let not even go into the annual compounded growth rate.

Though either ways if I were the other party I would have still asked for a reversal. And here's why:

Such error's can easily happen in the reverse order (like in your case) and most often happen on a larger transaction AND if I did not complain about the beneficial trade I would lose a great amount of credibility in court or arbitration for the wrongdoing.

Also Coinbase would be well within their rights to reverse the transaction if they followed due process.

But, I have serious doubt about all CoinBase practices since yesterday (when I first saw this error), and here's why:

1. Even if I was not adept or did not have experience at reading the tape (time and sales) etc, it would be very easy for me or anyone to very if a transaction occurred on any BTC exchange at around this price level as the data is freely available, also all web based charts available for this would have developed an enormous tail. Which implies just one legitimate reason, that is Internal Matching.[0]

2. Fortunately internal matching works differently than open exchanges that have a bid/ask spread which can get quite wide on BTC due to thin volumes, but remains in a 1% range for good measure lets call this a +/- 10% spread, so on this day if volumes were thin someone could have bought BTC at $1242 * 1.1 => $1366.2 or could have sold it for $1242 * 0.9 => $1117.8.

But like I said fortunately internal matching would work differently. Much like a normal exchange it would work on a first in first out basis (FIFO) so if there is one or more buyer at X price and someone decides to sell the first order would be filled. Usually X would be the current market rate +/- an acceptable slippage which is lower than the open market let call this 5%, though it should be no more that 1%). So the worst internal match would be $1242 * 1.15 for buying or $1242 * 0.85 for selling. If this pricing condition is not met coinbase themselves could be the seller(thus become an internal market maker) or the would route the order to an open exchange.

There is a near-zero possibility of the fill happening at 68.074% lower than the market rate. The only way this could have happened is if once the order was sent to the market in the form of a market order and there was zero bidders between the ask and < $396.52(since I assume the rate includes a fees).

But if it was not internally matched and did not get executed on any exchange the only somewhat legal possibility remaining is an intentional technical/code error the only other options remaining is (hint: completely unethical and/or illegal) them not doing an exchange at all aka. market making at +/- 60%+.

3. Unfortunately if this is a technical error, it most definitely must have happened to other customers too, if it did on a partial fill the sell price would be an average, hence most users would never see it and there (CBs) books would get cleared during the end-of-day reconciliation.

I will leave the speculation as to other reasons here. No reason to allege any deliberate wrong doing beyond their lack of understanding about auditing financial transactions.

Though did you get your trade reversed?

edit: bias correction (explained below)

I am big supporter and bigger moralizer with all things relating to the business practices and moral obligations of companies when dealing with the small guys. The critic in me can draw and deduct conclusions that may skip considering situations which while possible have a very very low probability of happening. But as Murphy would say, "Anything that can go wrong, will go wrong". So acknowledging murphy's law its my moralizing responsibility to moralize myself and declare the point below [0]. [1] is further moralizing by me, old habits and all that.

[0] There is a remote(but worth mentioning) possibility that as I cannot truly check all exchanges where BTC is traded and cannot identify the exchange through where coinbase executes their trades there is a possibility, however remote that CoinBase could have used an obscure exchange for this transaction that had spreads as wide as +/- 68%. In that case it can/may nullify completely any observations and opinions I shared above, thus rendering my opinions incorrect, in which case I apologize.

[1]Though I would request if this is the case that CoinBase/Brian make it clear in their TOS that this is the case, so that users can make an informed decision with the knowledge that they can potentially lose value due to these extreme situations. Of course you would likely not need to legally disclose this so, not disclosing it is also fair.