I stumbled across a very weird behavior on HttpClient.get. I am trying to figure this out by myself for an eternity, but it does not make sense to me. I am requesting an array of pretty complex objects but on the clientside some properties are missing, which are sent by the server and even visible in Chrome DevTools Network Tab.
Missing values appear on user => jobApplication[] => updates[].
Here is my method to get objects
async getRelevantUsers(showError = true): Promise<User[]> {
const reply = await this.http.get<any>((isDevMode() ? serverConstants.devServerUrl : serverConstants.prodServerUrl) + 'user/relevant', this.requestOptions).pipe(catchError((err, caught) => {
console.log(err);
return new Promise(resolve => {
resolve(undefined);
});
})).toPromise();
if (reply) {
console.log(reply);
return reply;
}
return undefined;
}
Here the response in Chrome DevTools network Tab for a specific user from the list (Postman shows the same outcome):
The following image shows the response of the same user from the console.log(...)
point of view in the method i posted here. Why is there only one element in the array updates
instead of multiple like sent by the server? It does not get manipulated by myself, where is the problem?
Angular appends only the last update with id 19 ?? why