mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 17:30:16 +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
|
|
@ -16,7 +16,7 @@ import { cn } from '~/utils';
|
|||
|
||||
const Icon: React.FC<IconProps> = (props) => {
|
||||
const { user } = useAuthContext();
|
||||
const { size = 30, isCreatedByUser, button, model = '', endpoint, error, jailbreak } = props;
|
||||
const { size = 30, isCreatedByUser, button, model = '', endpoint, jailbreak } = props;
|
||||
|
||||
if (isCreatedByUser) {
|
||||
const username = user?.name || 'User';
|
||||
|
|
@ -130,11 +130,11 @@ const Icon: React.FC<IconProps> = (props) => {
|
|||
)}
|
||||
>
|
||||
{icon}
|
||||
{error && (
|
||||
{/* {error && (
|
||||
<span className="absolute right-0 top-[20px] -mr-2 flex h-4 w-4 items-center justify-center rounded-full border border-white bg-red-500 text-[10px] text-white">
|
||||
!
|
||||
</span>
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue