Skip to content

Commit a18c359

Browse files
authored
fix: correct InvalidCustomPropertyError code and MemoryStore promise handling (#2853)
1 parent 41060d1 commit a18c359

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/conversation-store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ export class MemoryStore<ConversationState = any> implements ConversationStore<C
3636
// release the memory
3737
this.state.delete(conversationId);
3838
reject(new Error('Conversation expired'));
39+
return;
3940
}
4041
resolve(entry.value);
42+
return;
4143
}
4244
reject(new Error('Conversation not found'));
4345
});

src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class ContextMissingPropertyError extends Error implements CodedError {
106106
}
107107

108108
export class InvalidCustomPropertyError extends Error implements CodedError {
109-
public code = ErrorCode.AppInitializationError;
109+
public code = ErrorCode.InvalidCustomPropertyError;
110110
}
111111

112112
export class CustomRouteInitializationError extends Error implements CodedError {

0 commit comments

Comments
 (0)