chore(backend): Log apiHelper op debug niveau
This commit is contained in:
parent
57a16acbdd
commit
703e00efc7
1 changed files with 3 additions and 3 deletions
|
@ -25,16 +25,16 @@ export async function fetchWithLogging<T>(
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 404) {
|
if (error.response.status === 404) {
|
||||||
logger.error(
|
logger.debug(
|
||||||
`❌ ERROR: ${description} not found (404) at "${url}".`
|
`❌ ERROR: ${description} not found (404) at "${url}".`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
logger.error(
|
logger.debug(
|
||||||
`❌ ERROR: Failed to fetch ${description}. Status: ${error.response.status} - ${error.response.statusText} (URL: "${url}")`
|
`❌ ERROR: Failed to fetch ${description}. Status: ${error.response.status} - ${error.response.statusText} (URL: "${url}")`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error(
|
logger.debug(
|
||||||
`❌ ERROR: Network or unexpected error when fetching ${description}:`,
|
`❌ ERROR: Network or unexpected error when fetching ${description}:`,
|
||||||
error.message
|
error.message
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue