I am experiencing difficulties with posting to the API while using a base class. I'm unsure how to resolve the issue mentioned below.
Any assistance would be greatly appreciated.
core.mjs:7635 ERROR Error: Uncaught (in promise): UnsubscriptionError: 1 errors occurred during unsubscription:
1) TypeError: finalizer.unsubscribe is not a function
Error
at _super (createErrorClass.js:4:26)
at new UnsubscriptionErrorImpl (UnsubscriptionError.js:3:5)
at OperatorSubscriber.unsubscribe (Subscription.js:55:23)
at OperatorSubscriber.unsubscribe (Subscriber.js:55:19)
at OperatorSubscriber.unsubscribe (OperatorSubscriber.js:51:19)
at OperatorSubscriber._complete (OperatorSubscriber.js:42:26)
at OperatorSubscriber.complete (Subscriber.js:49:18)
at Observable.<anonymous> (job.service.ts:248:16)
at Generator.next (<anonymous>)
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at resolvePromise (zone.js:1262:35)
at zone.js:1169:21
at zone.js:1185:37
at asyncGeneratorStep (asyncToGenerator.js:6:1)
at _next (asyncToGenerator.js:25:1)
at _ZoneDelegate.invoke (zone.js:409:30)
at Object.onInvoke (core.mjs:26231:33)
at _ZoneDelegate.invoke (zone.js:408:56)
at Zone.run (zone.js:169:47)
at zone.js:1326:38
Additionally, here is the code snippet causing the problem:
return Observable.create(async (observer) => {
const result = await this.convertNativeImagesToBase64(isMobile);
observer.next(result);
observer.complete()
}).pipe(
mergeMap(() => {
return this.apiService.sendIssue(payload).pipe(map((response: any) => {
return response;
},
));
}),
catchError((error) => {
const errorMessage = this.getErrorMessage(error, "Failed.");
const failed: any = { Success: false, Message: errorMessage };
return throwError(failed);
})
)