Skip to content

Commit

Permalink
fix(logging): enhance error logging by explicitly casting to Error fo…
Browse files Browse the repository at this point in the history
…r clearer messages in server host cluster info handling
  • Loading branch information
guidomodarelli committed Dec 12, 2024
1 parent 5a9c0de commit ecd91a9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ServerHostClusterInfoStateContainer implements StateContainer {

return result;
} catch (error) {
this.logger.error(`Error getting data: ${error.message}`);
this.logger.error(`Error getting data: ${(error as Error).message}`);
// TODO: implement
// const options = {
// context: `${AppState.name}.getClusterInfo`,
Expand Down Expand Up @@ -75,7 +75,7 @@ export class ServerHostClusterInfoStateContainer implements StateContainer {
this.logger.debug(`Encoded data was set: ${encodedData}`);
}
} catch (error) {
this.logger.error(`Error setting data: ${error.message}`);
this.logger.error(`Error setting data: ${(error as Error).message}`);
// TODO: implement
// const options = {
// context: `${AppState.name}.setClusterInfo`,
Expand Down

0 comments on commit ecd91a9

Please sign in to comment.