You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2021/01/06 13:10:17 UTC
[incubator-datalab] branch DATALAB-2209 created (now 9979466)
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a change to branch DATALAB-2209
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.
at 9979466 [DATALAB-2209]: Error issue during project stopping/termination
This branch includes the following new commits:
new 9979466 [DATALAB-2209]: Error issue during project stopping/termination
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org
[incubator-datalab] 01/01: [DATALAB-2209]: Error issue during
project stopping/termination
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2209
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 9979466835be96f4217f2e1a0f989f307abd3434
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Jan 6 15:09:51 2021 +0200
[DATALAB-2209]: Error issue during project stopping/termination
---
.../webapp/src/app/administration/project/project.component.ts | 2 +-
.../webapp/src/app/core/interceptors/error.interceptor.ts | 2 ++
.../resources/webapp/src/app/core/services/project.service.ts | 4 +++-
.../src/main/resources/webapp/src/app/core/util/errorUtils.ts | 10 +++++++++-
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
index bc4ab9e..1ea698a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
@@ -149,7 +149,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
this.refreshGrid();
this.toastr.success(`Edge node ${this.toEndpointAction(action)} is in progress!`, 'Processing!');
}, error => {
- console.log(error);
+ console.log('edgeNodeAction', error);
this.toastr.error(error.message, 'Oops!');
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts
index d1ae984..2389a69 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts
@@ -92,6 +92,8 @@ import { HTTP_STATUS_CODES } from '../util';
private handleBadRequest(error, request: HttpRequest<any>, next: HttpHandler) {
if (error.url.indexOf('refresh') > -1) this.routingService.redirectToLoginPage();
+ console.log('handleBadRequest error', error);
+ console.log('handleBadRequest request', request);
return next.handle(request);
}
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
index ccf93f8..7967329 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
@@ -19,10 +19,11 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
-import { map, catchError } from 'rxjs/operators';
+import {map, catchError, tap} from 'rxjs/operators';
import { ApplicationServiceFacade } from './applicationServiceFacade.service';
import { ErrorUtils } from '../util';
+import {logger} from 'codelyzer/util/logger';
@Injectable()
export class ProjectService {
@@ -66,6 +67,7 @@ export class ProjectService {
return this.applicationServiceFacade
.buildToggleProjectStatus(url, data)
.pipe(
+ tap(v => console.log('service', v)),
map(response => response),
catchError(ErrorUtils.handleServiceError));
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
index f9f6aa4..b23c05e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
@@ -41,8 +41,16 @@ export class ErrorUtils {
// }
public static handleServiceError(errorMessage) {
- console.log(errorMessage);
+ console.log('handleServiceError', errorMessage);
const error = CheckUtils.isJSON(errorMessage.error) ? JSON.parse(errorMessage.error) : errorMessage.error;
+ if (!error) {
+ observableThrowError({
+ status: 409,
+ statusText: 'Something went wrong',
+ message: 'Something went wrong'
+ });
+ }
+
return observableThrowError({
status: error.code,
statusText: errorMessage.statusText,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org