So I using cakephp and using ajax to submit forms. In some cases it returns a custom error.
For example, at one point it can be like:
Failed to load resource: the server responded with a status of 412
([{"field":"PaymentCardholderName","message":"Please enter CardHolder's Name."},
{"field":"PaymentCardNumber","message":"Please enter Card Number."},
{"field":"PaymentCvvNumber","message":"Please enter CVV Number."},
{"field":"PaymentBillingAddress","message":"Please enter your Billing Address"}])
Here is the server logic in case anyone needs it
header('HTTP/1.1 412 ' . json_encode($error));
when I open this up locally I see my custom error message. When I deploy it to a remote server I just see my custom error message overwritten
Failed to load resource: the server responded with a status of 412
(Precondition Failed)
It must be some configuration, but I can't find it.
echoit) - HTTP is not designed to work in the way you are attempting to use it.