Hi catched the error internal server error already and logged em. But I dont know how to call the next request inside this error handling. I need to revert the beginning selectElevation(elevation.id) request by calling another request method selectPhase(this.sessionState.phaseId) if the request selectElementPricelistConfigurator() fails.
goToConfiguratorAndLoadData(elevation: Elevation) {
this.apiService.selectElevation(elevation.id).pipe(
mergeMap( () => this.apiService.selectElementPricelistConfigurator() ),
).subscribe(
(next) => {
...
},
(err: Error | HttpErrorResponse) => {
if (err instanceof HttpErrorResponse) {
if (err.status === 500) {
console.log('Error', err.status);
this.apiService.selectPhase(this.sessionState.phaseId);
}
} else {
throwError(err);
}
}
);
}
The server just stops and is not firing this http request.

Thanks for any help, didnt found any similiar problem.
Edited:
ApiServer - selectPhase Method:
selectPhase(phaseId: string): Observable<any> {
return this.httpClient.post(this.apiUrl + '/phases/select', {
identifier: phaseId,
});
}