Hi Henning,
I really appreciate your reply!
So I've figured it out - and actually the clue was in Keyur's similar issue linked above. This perhaps is merely an idiosyncrasy with Craft (or actually Yii2, the framework it's built on), but I'm going to explain what was happening, in case there is anything that Unpoly could do to handle this scenario...
When Craft Commerce handles a POST submission and decides how to marshal the response, it first checks if the response will "accept JSON". If it does, it returns JSON; otherwise, it initiates a 302 redirect, and that is all done via Yii2's internal redirection routine...
However, Yii2 does it's own check for how best to return the response, and as part of that routine decides if the request "is AJAX", which it does by checking if it's an XMLHttpRequest. If it is, then it sends an `X-Redirect` header (or if it further determines it is Pjax, sends an `X-Pjax-Url` header). Otherwise, it sets the `Location` header.
What this meant was that, Yii2 was not sending a "Location" header back with its 302 response, because Yii2 detected that it was an XMLHttpRequest.
I tried adding "X-Up-Location" as a header, but it seemed that without also the "Location" header, the redirect was essentially going unhandled, and so then unpoly throws that fatal error because it sees that the response is not in the 200 range.
I can fix this on my end, by ensuring that a "Location" header gets sent; but I'd be curious to hear your thoughts on the above. Is it a surprise that "X-Up-Location" wasn't enough to get this working? Is "X-Redirect" a convention that should be accounted for?
Thanks for your time!