Below is the function I am using:
createVersion(data: any): Promise<any> {
return new Promise((resolve, reject) => {
this._httpClient
.post(`${environment.apiUrl}/v1.0/versions`, data, {
observe: "response",
})
.subscribe((response: any) => {
resolve(response);
}, reject);
});
}
When I invoke it like this:
this._versionAddService.createVersion(args).then((result) => {})
I encounter the following error:
core.mjs:7640 ERROR Error: Uncaught (in promise): OK at resolvePromise (zone.js:1213:31) at resolvePromise (zone.js:1167:17) at zone.js:1279:17 at ZoneDelegate.invokeTask (zone.js:406:31) at Object.onInvokeTask (core.mjs:26363:33) at ZoneDelegate.invokeTask (zone.js:405:60) at Zone.runTask (zone.js:178:47) at drainMicroTaskQueue (zone.js:582:35) at ZoneTask.invokeTask [as invoke] (zone.js:491:21) at invokeTask (zone.js:1600:14)