mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4609]Logging the response in case of error. (#4784)
* Logging the response in case of error. * Enable all cloud tests * no message * no message * Comment failing tests
This commit is contained in:
committed by
Eugenio Romano
parent
f6d8bd4130
commit
36faed0fab
@@ -77,16 +77,23 @@ export class IdentityService {
|
||||
}
|
||||
|
||||
async createUser(user: UserModel) {
|
||||
const path = '/users';
|
||||
const method = 'POST';
|
||||
const queryParams = {}, postBody = {
|
||||
'username': user.username,
|
||||
'firstName': user.firstName,
|
||||
'lastName': user.lastName,
|
||||
'enabled': true,
|
||||
'email': user.email
|
||||
};
|
||||
return await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
try {
|
||||
const path = '/users';
|
||||
const method = 'POST';
|
||||
|
||||
const queryParams = {}, postBody = {
|
||||
'username': user.username,
|
||||
'firstName': user.firstName,
|
||||
'lastName': user.lastName,
|
||||
'enabled': true,
|
||||
'email': user.email
|
||||
};
|
||||
|
||||
return await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('Create User - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
async deleteUser(userId) {
|
||||
|
@@ -39,7 +39,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('Task Service error');
|
||||
console.log('Create Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('Task Service error');
|
||||
console.log('Complete Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -68,7 +68,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('claim Task Service error');
|
||||
console.log('Claim Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('delete task Service error');
|
||||
console.log('Delete Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('get Task Service error');
|
||||
console.log('Get Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export class TasksService {
|
||||
return data.list.entries && data.list.entries.length > 0 ? data.list.entries[0].entry.id : null;
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('get Task Service error');
|
||||
console.log('Get Task Id - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export class TasksService {
|
||||
return await this.api.performBpmOperation(path, method, queryParams, postBody);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('create Task Service error');
|
||||
console.log('Create Task - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user