Changed console logging of errors to use console error logging

This commit is contained in:
Jesper Kristensen
2025-05-15 21:35:07 +02:00
parent ca2cfb5bad
commit 20c1c3f66b
23 changed files with 269 additions and 269 deletions
+11 -11
View File
@@ -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) {