Changed console logging of errors to use console error logging
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user