Commit a47ea79
committed
test($http): ensure json deserialization errors are forwarded to error handler
Since angular@e13eeab,
errors thrown from onFulfilled and onRejected handlers are passed to the regular http
error handlers. Before this, JSON deserialization errors lead to hard application errors, and could
not be handled by application code. This behavior was introduced in angular@7b6c1d0, and originally, a malformed JSON string was forwarded
as the data to the http success response handler.
This commit adds a specifc test case, even though the behavior is unlikely to break in the future without
a change in the $q rejection handling.
Related angular#11433
Closes angular#156891 parent 5ca0de6 commit a47ea79
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1371 | 1385 | | |
1372 | 1386 | | |
1373 | 1387 | | |
| |||
0 commit comments