mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
added try - catch in api and handleError methods
This commit is contained in:
@@ -38,7 +38,7 @@ export class CommentsApi extends RepoApi {
|
||||
await this.apiAuth();
|
||||
return await this.commentsApi.listComments(nodeId);
|
||||
} catch (error) {
|
||||
console.log('--- comments api getNodeComments catch error: ', error);
|
||||
this.handleError(`${this.constructor.name} ${this.getNodeComments.name}`, error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export class CommentsApi extends RepoApi {
|
||||
await this.apiAuth();
|
||||
return await this.commentsApi.createComment(nodeId, { "content": comment });
|
||||
} catch (error) {
|
||||
console.log('--- comments api addComment catch error: ', error);
|
||||
this.handleError(`${this.constructor.name} ${this.addComment.name}`, error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ export class CommentsApi extends RepoApi {
|
||||
await this.apiAuth();
|
||||
return await this.commentsApi.createComment(nodeId, comment);
|
||||
} catch (error) {
|
||||
console.log('--- comments api addComments catch error: ', error);
|
||||
this.handleError(`${this.constructor.name} ${this.addComments.name}`, error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user