Skip to content

Commit

Permalink
fix(types): improve typing for set method and enhance error logging c…
Browse files Browse the repository at this point in the history
…larity with explicit Error casting in server host state management
  • Loading branch information
guidomodarelli committed Dec 12, 2024
1 parent ecd91a9 commit e29fb5b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ServerHostStateContainer implements StateContainer {
return false;
}

set(data) {
set(data: any) {
try {
this.logger.debug(`Setting data: ${data}`);

Expand All @@ -55,7 +55,7 @@ export class ServerHostStateContainer 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}.setCurrentAPI`,
Expand Down

0 comments on commit e29fb5b

Please sign in to comment.