diff --git a/src/lib/apis/audio/index.ts b/src/lib/apis/audio/index.ts index 5cd6ab949c..f6354da776 100644 --- a/src/lib/apis/audio/index.ts +++ b/src/lib/apis/audio/index.ts @@ -15,7 +15,7 @@ export const getAudioConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -52,7 +52,7 @@ export const updateAudioConfig = async (token: string, payload: OpenAIConfigForm return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -83,7 +83,7 @@ export const transcribeAudio = async (token: string, file: File) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -120,7 +120,7 @@ export const synthesizeOpenAISpeech = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -152,7 +152,7 @@ export const getModels = async (token: string = ''): Promise { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -180,7 +180,7 @@ export const getVoices = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/auths/index.ts b/src/lib/apis/auths/index.ts index 75252fd716..a23e4cdc62 100644 --- a/src/lib/apis/auths/index.ts +++ b/src/lib/apis/auths/index.ts @@ -15,7 +15,7 @@ export const getAdminDetails = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -42,7 +42,7 @@ export const getAdminConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -70,7 +70,7 @@ export const updateAdminConfig = async (token: string, body: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -98,7 +98,7 @@ export const getSessionUser = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -129,7 +129,7 @@ export const ldapUserSignIn = async (user: string, password: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; @@ -157,7 +157,7 @@ export const getLdapConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -187,7 +187,7 @@ export const updateLdapConfig = async (token: string = '', enable_ldap: boolean) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -214,7 +214,7 @@ export const getLdapServer = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -242,7 +242,7 @@ export const updateLdapServer = async (token: string = '', body: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -273,7 +273,7 @@ export const userSignIn = async (email: string, password: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; @@ -312,7 +312,7 @@ export const userSignUp = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -339,7 +339,7 @@ export const userSignOut = async () => { return res; }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -378,7 +378,7 @@ export const addUser = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -409,7 +409,7 @@ export const updateUserProfile = async (token: string, name: string, profileImag return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -440,7 +440,7 @@ export const updateUserPassword = async (token: string, password: string, newPas return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -467,7 +467,7 @@ export const getSignUpEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -494,7 +494,7 @@ export const getDefaultUserRole = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -524,7 +524,7 @@ export const updateDefaultUserRole = async (token: string, role: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -551,7 +551,7 @@ export const toggleSignUpEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -578,7 +578,7 @@ export const getJWTExpiresDuration = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -608,7 +608,7 @@ export const updateJWTExpiresDuration = async (token: string, duration: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -635,7 +635,7 @@ export const createAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -660,7 +660,7 @@ export const getAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -685,7 +685,7 @@ export const deleteAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/channels/index.ts b/src/lib/apis/channels/index.ts index cd46410c7d..548572c6fb 100644 --- a/src/lib/apis/channels/index.ts +++ b/src/lib/apis/channels/index.ts @@ -28,7 +28,7 @@ export const createNewChannel = async (token: string = '', channel: ChannelForm) }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getChannels = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -90,7 +90,7 @@ export const getChannelById = async (token: string = '', channel_id: string) => }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -126,7 +126,7 @@ export const updateChannelById = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -157,7 +157,7 @@ export const deleteChannelById = async (token: string = '', channel_id: string) }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -196,7 +196,7 @@ export const getChannelMessages = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -236,7 +236,7 @@ export const getChannelThreadMessages = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -275,7 +275,7 @@ export const sendMessage = async (token: string = '', channel_id: string, messag }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -315,7 +315,7 @@ export const updateMessage = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -355,7 +355,7 @@ export const addReaction = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -395,7 +395,7 @@ export const removeReaction = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -429,7 +429,7 @@ export const deleteMessage = async (token: string = '', channel_id: string, mess }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/chats/index.ts b/src/lib/apis/chats/index.ts index 02bdd4eb31..0ff56ea23e 100644 --- a/src/lib/apis/chats/index.ts +++ b/src/lib/apis/chats/index.ts @@ -21,7 +21,7 @@ export const createNewChat = async (token: string, chat: object) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -61,7 +61,7 @@ export const importChat = async ( }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -97,7 +97,7 @@ export const getChatList = async (token: string = '', page: number | null = null }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -131,7 +131,7 @@ export const getChatListByUserId = async (token: string = '', userId: string) => }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -165,7 +165,7 @@ export const getArchivedChatList = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -196,7 +196,7 @@ export const getAllChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -231,7 +231,7 @@ export const getChatListBySearchText = async (token: string, text: string, page: }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -265,7 +265,7 @@ export const getChatsByFolderId = async (token: string, folderId: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -296,7 +296,7 @@ export const getAllArchivedChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -327,7 +327,7 @@ export const getAllUserChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -358,7 +358,7 @@ export const getAllTags = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -389,7 +389,7 @@ export const getPinnedChatList = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -426,7 +426,7 @@ export const getChatListByTagName = async (token: string = '', tagName: string) }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -461,7 +461,7 @@ export const getChatById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -493,7 +493,7 @@ export const getChatByShareId = async (token: string, share_id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -531,7 +531,7 @@ export const getChatPinnedStatusById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -569,7 +569,7 @@ export const toggleChatPinnedStatusById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -610,7 +610,7 @@ export const cloneChatById = async (token: string, id: string, title?: string) = error = err; } - console.log(err); + console.error(err); return null; }); @@ -648,7 +648,7 @@ export const cloneSharedChatById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -680,7 +680,7 @@ export const shareChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -715,7 +715,7 @@ export const updateChatFolderIdById = async (token: string, id: string, folderId .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -747,7 +747,7 @@ export const archiveChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -779,7 +779,7 @@ export const deleteSharedChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -814,7 +814,7 @@ export const updateChatById = async (token: string, id: string, chat: object) => .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -846,7 +846,7 @@ export const deleteChatById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -878,7 +878,7 @@ export const getTagsById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -912,7 +912,7 @@ export const addTagById = async (token: string, id: string, tagName: string) => }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -947,7 +947,7 @@ export const deleteTagById = async (token: string, id: string, tagName: string) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -978,7 +978,7 @@ export const deleteTagsById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -1010,7 +1010,7 @@ export const deleteAllChats = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -1042,7 +1042,7 @@ export const archiveAllChats = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/configs/index.ts b/src/lib/apis/configs/index.ts index 5872303f6a..26dec26c9d 100644 --- a/src/lib/apis/configs/index.ts +++ b/src/lib/apis/configs/index.ts @@ -19,7 +19,7 @@ export const importConfig = async (token: string, config) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -46,7 +46,7 @@ export const exportConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -73,7 +73,7 @@ export const getDirectConnectionsConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -103,7 +103,7 @@ export const setDirectConnectionsConfig = async (token: string, config: object) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -130,7 +130,7 @@ export const getToolServerConnections = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -160,7 +160,7 @@ export const setToolServerConnections = async (token: string, connections: objec return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -190,7 +190,7 @@ export const verifyToolServerConnection = async (token: string, connection: obje return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -217,7 +217,7 @@ export const getCodeExecutionConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -247,7 +247,7 @@ export const setCodeExecutionConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -274,7 +274,7 @@ export const getModelsConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -304,7 +304,7 @@ export const setModelsConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -334,7 +334,7 @@ export const setDefaultPromptSuggestions = async (token: string, promptSuggestio return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -361,7 +361,7 @@ export const getBanners = async (token: string): Promise => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -391,7 +391,7 @@ export const setBanners = async (token: string, banners: Banner[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/evaluations/index.ts b/src/lib/apis/evaluations/index.ts index f6f35f7c18..96a689fcb1 100644 --- a/src/lib/apis/evaluations/index.ts +++ b/src/lib/apis/evaluations/index.ts @@ -20,7 +20,7 @@ export const getConfig = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const updateConfig = async (token: string, config: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const getAllFeedbacks = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -113,7 +113,7 @@ export const exportAllFeedbacks = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -144,7 +144,7 @@ export const createNewFeedback = async (token: string, feedback: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -175,7 +175,7 @@ export const getFeedbackById = async (token: string, feedbackId: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -206,7 +206,7 @@ export const updateFeedbackById = async (token: string, feedbackId: string, feed }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -234,7 +234,7 @@ export const deleteFeedbackById = async (token: string, feedbackId: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/files/index.ts b/src/lib/apis/files/index.ts index 6a42ec6147..261fe56db7 100644 --- a/src/lib/apis/files/index.ts +++ b/src/lib/apis/files/index.ts @@ -19,7 +19,7 @@ export const uploadFile = async (token: string, file: File) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -76,7 +76,7 @@ export const getFiles = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -107,7 +107,7 @@ export const getFileById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -141,7 +141,7 @@ export const updateFileDataContentById = async (token: string, id: string, conte }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -168,7 +168,7 @@ export const getFileContentById = async (id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -200,7 +200,7 @@ export const deleteFileById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -231,7 +231,7 @@ export const deleteAllFiles = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/folders/index.ts b/src/lib/apis/folders/index.ts index f1a1f5b483..21ec426b05 100644 --- a/src/lib/apis/folders/index.ts +++ b/src/lib/apis/folders/index.ts @@ -50,7 +50,7 @@ export const getFolders = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -81,7 +81,7 @@ export const getFolderById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -115,7 +115,7 @@ export const updateFolderNameById = async (token: string, id: string, name: stri }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -153,7 +153,7 @@ export const updateFolderIsExpandedById = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -187,7 +187,7 @@ export const updateFolderParentIdById = async (token: string, id: string, parent }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -226,7 +226,7 @@ export const updateFolderItemsById = async (token: string, id: string, items: Fo }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -257,7 +257,7 @@ export const deleteFolderById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/functions/index.ts b/src/lib/apis/functions/index.ts index ed3306b321..f1a9bf5a08 100644 --- a/src/lib/apis/functions/index.ts +++ b/src/lib/apis/functions/index.ts @@ -20,7 +20,7 @@ export const createNewFunction = async (token: string, func: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getFunctions = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const exportFunctions = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -114,7 +114,7 @@ export const getFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -149,7 +149,7 @@ export const updateFunctionById = async (token: string, id: string, func: object .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -181,7 +181,7 @@ export const deleteFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -213,7 +213,7 @@ export const toggleFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -245,7 +245,7 @@ export const toggleGlobalById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -277,7 +277,7 @@ export const getFunctionValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -309,7 +309,7 @@ export const getFunctionValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -344,7 +344,7 @@ export const updateFunctionValvesById = async (token: string, id: string, valves .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -376,7 +376,7 @@ export const getUserValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -408,7 +408,7 @@ export const getUserValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -443,7 +443,7 @@ export const updateUserValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/groups/index.ts b/src/lib/apis/groups/index.ts index b7d4f8ef9f..c55f477af5 100644 --- a/src/lib/apis/groups/index.ts +++ b/src/lib/apis/groups/index.ts @@ -20,7 +20,7 @@ export const createNewGroup = async (token: string, group: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getGroups = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -83,7 +83,7 @@ export const getGroupById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -118,7 +118,7 @@ export const updateGroupById = async (token: string, id: string, group: object) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -150,7 +150,7 @@ export const deleteGroupById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/images/index.ts b/src/lib/apis/images/index.ts index 2e6510437b..a58d16085f 100644 --- a/src/lib/apis/images/index.ts +++ b/src/lib/apis/images/index.ts @@ -16,7 +16,7 @@ export const getConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -51,7 +51,7 @@ export const updateConfig = async (token: string = '', config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -83,7 +83,7 @@ export const verifyConfigUrl = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -115,7 +115,7 @@ export const getImageGenerationConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -148,7 +148,7 @@ export const updateImageGenerationConfig = async (token: string = '', config: ob return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -180,7 +180,7 @@ export const getImageGenerationModels = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -215,7 +215,7 @@ export const imageGenerations = async (token: string = '', prompt: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { diff --git a/src/lib/apis/index.ts b/src/lib/apis/index.ts index 3892afeb8e..710179c124 100644 --- a/src/lib/apis/index.ts +++ b/src/lib/apis/index.ts @@ -25,7 +25,7 @@ export const getModels = async ( }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -173,7 +173,7 @@ export const chatCompleted = async (token: string, body: ChatCompletedForm) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -212,7 +212,7 @@ export const chatAction = async (token: string, action_id: string, body: ChatAct return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -244,7 +244,7 @@ export const stopTask = async (token: string, id: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -276,7 +276,7 @@ export const getTaskIdsByChatId = async (token: string, chat_id: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -315,7 +315,7 @@ export const getToolServerData = async (token: string, url: string) => { } }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -491,7 +491,7 @@ export const getTaskConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -520,7 +520,7 @@ export const updateTaskConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -562,7 +562,7 @@ export const generateTitle = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -634,7 +634,7 @@ export const generateTags = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -706,7 +706,7 @@ export const generateEmoji = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -756,7 +756,7 @@ export const generateQueries = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -828,7 +828,7 @@ export const generateAutoCompletion = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -892,7 +892,7 @@ export const generateMoACompletion = async ( stream: true }) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -920,7 +920,7 @@ export const getPipelinesList = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -954,7 +954,7 @@ export const uploadPipeline = async (token: string, file: File, urlIdx: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -990,7 +990,7 @@ export const downloadPipeline = async (token: string, url: string, urlIdx: strin return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -1026,7 +1026,7 @@ export const deletePipeline = async (token: string, id: string, urlIdx: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -1063,7 +1063,7 @@ export const getPipelines = async (token: string, urlIdx?: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1100,7 +1100,7 @@ export const getPipelineValves = async (token: string, pipeline_id: string, urlI return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1136,7 +1136,7 @@ export const getPipelineValvesSpec = async (token: string, pipeline_id: string, return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1178,7 +1178,7 @@ export const updatePipelineValves = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; @@ -1210,7 +1210,7 @@ export const getBackendConfig = async () => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1236,7 +1236,7 @@ export const getChangelog = async () => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1263,7 +1263,7 @@ export const getVersionUpdates = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1290,7 +1290,7 @@ export const getModelFilterConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1325,7 +1325,7 @@ export const updateModelFilterConfig = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1352,7 +1352,7 @@ export const getWebhookUrl = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1382,7 +1382,7 @@ export const updateWebhookUrl = async (token: string, url: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1409,7 +1409,7 @@ export const getCommunitySharingEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1436,7 +1436,7 @@ export const toggleCommunitySharingEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -1463,7 +1463,7 @@ export const getModelConfig = async (token: string): Promise return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1511,7 +1511,7 @@ export const updateModelConfig = async (token: string, config: GlobalModelConfig return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); diff --git a/src/lib/apis/knowledge/index.ts b/src/lib/apis/knowledge/index.ts index 92fda2a953..c01c986a2a 100644 --- a/src/lib/apis/knowledge/index.ts +++ b/src/lib/apis/knowledge/index.ts @@ -27,7 +27,7 @@ export const createNewKnowledge = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -58,7 +58,7 @@ export const getKnowledgeBases = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -89,7 +89,7 @@ export const getKnowledgeBaseList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -121,7 +121,7 @@ export const getKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -166,7 +166,7 @@ export const updateKnowledgeById = async (token: string, id: string, form: Knowl .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -201,7 +201,7 @@ export const addFileToKnowledgeById = async (token: string, id: string, fileId: .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -236,7 +236,7 @@ export const updateFileFromKnowledgeById = async (token: string, id: string, fil .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -271,7 +271,7 @@ export const removeFileFromKnowledgeById = async (token: string, id: string, fil .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -303,7 +303,7 @@ export const resetKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -335,7 +335,7 @@ export const deleteKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -363,7 +363,7 @@ export const reindexKnowledgeFiles = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/memories/index.ts b/src/lib/apis/memories/index.ts index 3fd83ca9e0..d8fdc638fa 100644 --- a/src/lib/apis/memories/index.ts +++ b/src/lib/apis/memories/index.ts @@ -17,7 +17,7 @@ export const getMemories = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -48,7 +48,7 @@ export const addNewMemory = async (token: string, content: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -79,7 +79,7 @@ export const updateMemoryById = async (token: string, id: string, content: strin }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -110,7 +110,7 @@ export const queryMemory = async (token: string, content: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -142,7 +142,7 @@ export const deleteMemoryById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -174,7 +174,7 @@ export const deleteMemoriesByUserId = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/models/index.ts b/src/lib/apis/models/index.ts index 9cf625d035..3e6e0d0c0b 100644 --- a/src/lib/apis/models/index.ts +++ b/src/lib/apis/models/index.ts @@ -20,7 +20,7 @@ export const getModels = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getBaseModels = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -80,7 +80,7 @@ export const createNewModel = async (token: string, model: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -115,7 +115,7 @@ export const getModelById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -150,7 +150,7 @@ export const toggleModelById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -186,7 +186,7 @@ export const updateModelById = async (token: string, id: string, model: object) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -221,7 +221,7 @@ export const deleteModelById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -253,7 +253,7 @@ export const deleteAllModels = async (token: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/notes/index.ts b/src/lib/apis/notes/index.ts index 23bec36f25..df0be72627 100644 --- a/src/lib/apis/notes/index.ts +++ b/src/lib/apis/notes/index.ts @@ -28,7 +28,7 @@ export const createNewNote = async (token: string, note: NoteItem) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getNotes = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -108,7 +108,7 @@ export const getNoteById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -143,7 +143,7 @@ export const updateNoteById = async (token: string, id: string, note: NoteItem) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -175,7 +175,7 @@ export const deleteNoteById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/ollama/index.ts b/src/lib/apis/ollama/index.ts index b96567e639..74f2914a92 100644 --- a/src/lib/apis/ollama/index.ts +++ b/src/lib/apis/ollama/index.ts @@ -51,7 +51,7 @@ export const getOllamaConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -92,7 +92,7 @@ export const updateOllamaConfig = async (token: string = '', config: OllamaConfi return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -124,7 +124,7 @@ export const getOllamaUrls = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -159,7 +159,7 @@ export const updateOllamaUrls = async (token: string = '', urls: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -191,7 +191,7 @@ export const getOllamaVersion = async (token: string, urlIdx?: number) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -223,7 +223,7 @@ export const getOllamaModels = async (token: string = '', urlIdx: null | number return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -268,7 +268,7 @@ export const generatePrompt = async (token: string = '', model: string, conversa ` }) }).catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -412,7 +412,7 @@ export const deleteModel = async (token: string, tagName: string, urlIdx: string return true; }) .catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -445,7 +445,7 @@ export const pullModel = async (token: string, tagName: string, urlIdx: number | name: tagName }) }).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -481,7 +481,7 @@ export const downloadModel = async ( }) } ).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -512,7 +512,7 @@ export const uploadModel = async (token: string, file: File, urlIdx: string | nu body: formData } ).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { diff --git a/src/lib/apis/openai/index.ts b/src/lib/apis/openai/index.ts index bab2d6e36a..f6cf76a735 100644 --- a/src/lib/apis/openai/index.ts +++ b/src/lib/apis/openai/index.ts @@ -16,7 +16,7 @@ export const getOpenAIConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -58,7 +58,7 @@ export const updateOpenAIConfig = async (token: string = '', config: OpenAIConfi return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -90,7 +90,7 @@ export const getOpenAIUrls = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -125,7 +125,7 @@ export const updateOpenAIUrls = async (token: string = '', urls: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -157,7 +157,7 @@ export const getOpenAIKeys = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -192,7 +192,7 @@ export const updateOpenAIKeys = async (token: string = '', keys: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -346,7 +346,7 @@ export const chatCompletion = async ( }, body: JSON.stringify(body) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -409,7 +409,7 @@ export const synthesizeOpenAISpeech = async ( voice: speaker }) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); diff --git a/src/lib/apis/prompts/index.ts b/src/lib/apis/prompts/index.ts index f1c54b1098..4129ea62aa 100644 --- a/src/lib/apis/prompts/index.ts +++ b/src/lib/apis/prompts/index.ts @@ -28,7 +28,7 @@ export const createNewPrompt = async (token: string, prompt: PromptItem) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getPrompts = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -90,7 +90,7 @@ export const getPromptList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -122,7 +122,7 @@ export const getPromptByCommand = async (token: string, command: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -158,7 +158,7 @@ export const updatePromptByCommand = async (token: string, prompt: PromptItem) = .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -192,7 +192,7 @@ export const deletePromptByCommand = async (token: string, command: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/retrieval/index.ts b/src/lib/apis/retrieval/index.ts index f4b937b68f..8fa6578ed9 100644 --- a/src/lib/apis/retrieval/index.ts +++ b/src/lib/apis/retrieval/index.ts @@ -15,7 +15,7 @@ export const getRAGConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -77,7 +77,7 @@ export const updateRAGConfig = async (token: string, payload: RAGConfigForm) => return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -104,7 +104,7 @@ export const getQuerySettings = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -140,7 +140,7 @@ export const updateQuerySettings = async (token: string, settings: QuerySettings return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -167,7 +167,7 @@ export const getEmbeddingConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -209,7 +209,7 @@ export const updateEmbeddingConfig = async (token: string, payload: EmbeddingMod return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -236,7 +236,7 @@ export const getRerankingConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -270,7 +270,7 @@ export const updateRerankingConfig = async (token: string, payload: RerankingMod return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -313,7 +313,7 @@ export const processFile = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -344,7 +344,7 @@ export const processYoutubeVideo = async (token: string, url: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -376,7 +376,7 @@ export const processWeb = async (token: string, collection_name: string, url: st }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -410,7 +410,7 @@ export const processWebSearch = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/tools/index.ts b/src/lib/apis/tools/index.ts index d1dc11c16f..52501a0e05 100644 --- a/src/lib/apis/tools/index.ts +++ b/src/lib/apis/tools/index.ts @@ -20,7 +20,7 @@ export const createNewTool = async (token: string, tool: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getTools = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const getToolList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -113,7 +113,7 @@ export const exportTools = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -145,7 +145,7 @@ export const getToolById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -180,7 +180,7 @@ export const updateToolById = async (token: string, id: string, tool: object) => .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -212,7 +212,7 @@ export const deleteToolById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -244,7 +244,7 @@ export const getToolValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -276,7 +276,7 @@ export const getToolValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -311,7 +311,7 @@ export const updateToolValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -343,7 +343,7 @@ export const getUserValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -375,7 +375,7 @@ export const getUserValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -410,7 +410,7 @@ export const updateUserValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/users/index.ts b/src/lib/apis/users/index.ts index be82454c22..48ef343f91 100644 --- a/src/lib/apis/users/index.ts +++ b/src/lib/apis/users/index.ts @@ -16,7 +16,7 @@ export const getUserGroups = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -43,7 +43,7 @@ export const getUserDefaultPermissions = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -73,7 +73,7 @@ export const updateUserDefaultPermissions = async (token: string, permissions: o return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -104,7 +104,7 @@ export const updateUserRole = async (token: string, id: string, role: string) => return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -154,7 +154,7 @@ export const getUsers = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -182,7 +182,7 @@ export const getAllUsers = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -208,7 +208,7 @@ export const getUserSettings = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -238,7 +238,7 @@ export const updateUserSettings = async (token: string, settings: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -265,7 +265,7 @@ export const getUserById = async (token: string, userId: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -291,7 +291,7 @@ export const getUserInfo = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -321,7 +321,7 @@ export const updateUserInfo = async (token: string, info: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -335,7 +335,7 @@ export const updateUserInfo = async (token: string, info: object) => { export const getAndUpdateUserLocation = async (token: string) => { const location = await getUserPosition().catch((err) => { - console.log(err); + console.error(err); return null; }); @@ -363,7 +363,7 @@ export const deleteUserById = async (token: string, userId: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -403,7 +403,7 @@ export const updateUserById = async (token: string, userId: string, user: UserUp return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/utils/index.ts b/src/lib/apis/utils/index.ts index 64db561249..1fc30ddbba 100644 --- a/src/lib/apis/utils/index.ts +++ b/src/lib/apis/utils/index.ts @@ -15,7 +15,7 @@ export const getGravatarUrl = async (token: string, email: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -41,7 +41,7 @@ export const executeCode = async (token: string, code: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; if (err.detail) { @@ -75,7 +75,7 @@ export const formatPythonCode = async (token: string, code: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; if (err.detail) { @@ -110,7 +110,7 @@ export const downloadChatAsPDF = async (token: string, title: string, messages: return res.blob(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -136,7 +136,7 @@ export const getHTMLFromMarkdown = async (token: string, md: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -170,7 +170,7 @@ export const downloadDatabase = async (token: string) => { window.URL.revokeObjectURL(url); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -206,7 +206,7 @@ export const downloadLiteLLMConfig = async (token: string) => { window.URL.revokeObjectURL(url); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; });