Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(common): parse error response body for responseType "json" #19477
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #18682
What is the new behavior?
Does this PR introduce a breaking change?
Is this going to be merged or the issue that it fixes updated soon? My app is full of forms which have server side validation that returns a 422 with json errors object. I then use this object to display field errors and this is now broken. I can fix by adding some logic to my interceptor to manually parse the json but not going to bother if the breaking change that was brought in 4.4.4 will be reversed in 4.4.5.
referenced this pull request
Oct 13, 2017
@dherges you may want to update this comment as it seems to still assume that only 'ok' results are being processed: https://github.com/angular/angular/pull/19477/files#diff-26683cfb34fa97883213282055aef1e7R189
Additionally, you may want to add a test which explicitly checks for XSSI prefix support in the error response: https://gist.github.com/Linskeyd/df32564d539862350e927721ffad86df