-
Notifications
You must be signed in to change notification settings - Fork 122
Description
There is something with implementation of saveRecord after we updated library, our app is not working correctly anymore. When we got error response, service returns always Model.
return httpCall
.map((res) => res.status === 201 ? this.extractRecordData(res, modelType, model) : model)
.catch((error) => {
console.error(error);
return Observable.of(model);
})
.map((res) => this.resetMetadataAttributes(res, attributesMetadata, modelType))
.map((res) => this.updateRelationships(res, relationships))
.catch((res) => this.handleError(res));
}
First catch is not necessary and should be removed. Second catch is never called... I dont know this part of code seems little messy for me. Can I make PR to fix this issue ? (Works correctly for us after delete of first catch)