mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🔧 fix: Error Handling Improvements (#1518)
* style(Icon): remove error bubble from message icon * fix(custom): `initializeClient` now throws error if apiKey or baseURL are admin provided but no env var was found * refactor(tPresetSchema): match `conversationId` type to `tConversationSchema` but optional, use `extendedModelEndpointSchema` for `endpoint` * fix(useSSE): minor improvements - use `completed` set to avoid submitting unecessary abort request - set preset with `newConversation` calls using initial conversation settings to prevent default Preset override as well as default settings - return if there is a parsing error within `onerror` as expected errors from server are properly formatted
This commit is contained in:
parent
c9aaf502af
commit
ead1c3c797
5 changed files with 57 additions and 14 deletions
|
|
@ -200,11 +200,12 @@ export const tPresetSchema = tConversationSchema
|
|||
})
|
||||
.merge(
|
||||
z.object({
|
||||
conversationId: z.string().optional(),
|
||||
conversationId: z.string().nullable().optional(),
|
||||
presetId: z.string().nullable().optional(),
|
||||
title: z.string().nullable().optional(),
|
||||
defaultPreset: z.boolean().optional(),
|
||||
order: z.number().optional(),
|
||||
endpoint: extendedModelEndpointSchema.nullable(),
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue