The ICM provides a big variety of different REST resources managed by various teams and services.
As the maturity of resources varies, so does the format of HTTP errors provided by those endpoints.
The classic error response was submitted via HTTP headers and slowly the new format of providing even localized messages in the body of an error is being implemented.
For the PWA this means that potentially every service and component managing a different resource has to handle different formats.
In version 0.23 of the PWA we refactored the error handling to provide a consistent simplified format for all HTTP errors throughout the application.
Most of the work is done by the HttpInterceptor ICMErrorMapperInterceptor.
It converts responses with
error-key headers, responses with
errors body and also provides a fallback mapping for errors not matching this format.