mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🌿 fix: Message Route Improvements (#3378)
* fix: do not throw errors for invalid convo id, simply return undefined * feat: Add error handling and logging to message route definitions * feat: Refactor Message.js to improve code organization and readability * fix: Return undefined instead of throwing error for invalid conversation ID in Message.spec.js
This commit is contained in:
parent
5d40d0a37a
commit
1acd47a0f6
3 changed files with 79 additions and 48 deletions
|
@ -78,7 +78,7 @@ describe('Message Operations', () => {
|
|||
|
||||
it('should throw an error for invalid conversation ID', async () => {
|
||||
mockMessage.conversationId = 'invalid-id';
|
||||
await expect(saveMessage(mockReq, mockMessage)).rejects.toThrow('Invalid conversation ID');
|
||||
await expect(saveMessage(mockReq, mockMessage)).resolves.toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue