Skip to content

Commit

Permalink
Catch syncTender errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Sep 19, 2023
1 parent 421f3f4 commit 38ac2b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/src/app/obudget-api.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { from, Subject } from 'rxjs';
import { EMPTY, from, Subject } from 'rxjs';
import { catchError, concatMap, debounceTime, map } from 'rxjs/operators';
import * as Sentry from "@sentry/angular";
import { AuthService } from 'dgp-oauth2-ng';
Expand Down Expand Up @@ -115,9 +115,11 @@ export class ObudgetApiService {
}

syncTendersInternal({body, tenders}) {
console.log('TTTT', body);
console.log('TTTT3', tenders);
return this.http.post(`${environment.api_endpoint}/sync-tenders`, body, this.etlApiService.httpOptions).pipe(
catchError((err) => {
console.log('TTTT4', err);
return EMPTY;
}),
map((result: any) => {
console.log('TTTT2', result);
result.tenders.forEach((t) => {
Expand All @@ -129,7 +131,7 @@ export class ObudgetApiService {
tender.survey.submitted = !!t.submitted;
}
});
})
}),
);
}

Expand Down

0 comments on commit 38ac2b2

Please sign in to comment.