Skip to content
Snippets Groups Projects
Commit 78b60f98 authored by mechtelm's avatar mechtelm
Browse files

commit just before major refactoring due to major api refactoring

parent 75395d5c
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,6 @@ export class AppComponent implements OnInit, OnDestroy { ...@@ -48,7 +48,6 @@ export class AppComponent implements OnInit, OnDestroy {
this.appErrorSubscription = this.mds.appError$.subscribe(err => { this.appErrorSubscription = this.mds.appError$.subscribe(err => {
if (err) { if (err) {
console.warn(err.description);
this.showError = true; this.showError = true;
} }
}); });
......
...@@ -35,18 +35,18 @@ export class AuthInterceptor implements HttpInterceptor { ...@@ -35,18 +35,18 @@ export class AuthInterceptor implements HttpInterceptor {
return next.handle(requestA).pipe( return next.handle(requestA).pipe(
tap(requ => { tap(requ => {
// filter out OPTIONS request // filter out OPTIONS request
if (requ.type > 0) { if (requ.type > 0) { // TODO check the way to detect OPTION
this.mds.decrementDelayedProcessesCount(); this.mds.decrementDelayedProcessesCount();
console.log('äöüsl');
} }
}), }),
catchError(e => { catchError(e => {
this.mds.decrementDelayedProcessesCount(); this.mds.decrementDelayedProcessesCount();
console.log('err dec');
if (e instanceof HttpErrorResponse) { if (e instanceof HttpErrorResponse) {
const httpError = e as HttpErrorResponse; const httpError = e as HttpErrorResponse;
if (httpError.error instanceof ErrorEvent) { if (httpError.error instanceof ErrorEvent) {
this.mds.appError$.next({ this.mds.appError$.next({
label: 'Fehler in der Netzwerk-Verbindung', label: 'Fehler in der Netzwerkverbindung',
description: httpError.message, description: httpError.message,
category: "PROBLEM" category: "PROBLEM"
}) })
......
...@@ -35,6 +35,7 @@ export class MainDataService { ...@@ -35,6 +35,7 @@ export class MainDataService {
public globalErrorMsg$ = new BehaviorSubject<ServerError>(null); // TODO remove globalErrorMsg$ public globalErrorMsg$ = new BehaviorSubject<ServerError>(null); // TODO remove globalErrorMsg$
public appError$ = new BehaviorSubject<AppError>(null); public appError$ = new BehaviorSubject<AppError>(null);
public delayedProcessesCount$ = new BehaviorSubject<number>(0); public delayedProcessesCount$ = new BehaviorSubject<number>(0);
public apiVersionProblem = false;
// set by app.component.ts // set by app.component.ts
public postMessage$ = new Subject<MessageEvent>(); public postMessage$ = new Subject<MessageEvent>();
......
...@@ -135,9 +135,11 @@ export class FilesComponent implements OnInit { ...@@ -135,9 +135,11 @@ export class FilesComponent implements OnInit {
} else { } else {
this.bs.getFiles().subscribe( this.bs.getFiles().subscribe(
(filedataresponse: GetFileResponseData[]) => { (filedataresponse: GetFileResponseData[]) => {
console.log('updateFileList ok');
this.serverfiles = new MatTableDataSource(filedataresponse); this.serverfiles = new MatTableDataSource(filedataresponse);
this.serverfiles.sort = this.sort; this.serverfiles.sort = this.sort;
}, (err: ServerError) => { }, (err: ServerError) => {
console.log('updateFileList err');
this.mds.appError$.next({ this.mds.appError$.next({
label: err.labelNice, label: err.labelNice,
description: err.labelSystem, description: err.labelSystem,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment