chore(backend): Verander API call logging niveau
Als de Dwengo API fouten geeft, dan hoeft dit maar als warning afgehandeld worden, niet als error.
This commit is contained in:
parent
74ecd34538
commit
57a16acbdd
2 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ export async function getLearningObjectById(
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!metadata) {
|
if (!metadata) {
|
||||||
logger.error(`⚠️ WARNING: Learning object "${hruid}" not found.`);
|
logger.warn(`⚠️ WARNING: Learning object "${hruid}" not found.`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ async function fetchLearningObjects(
|
||||||
!learningPathResponse.success ||
|
!learningPathResponse.success ||
|
||||||
!learningPathResponse.data?.length
|
!learningPathResponse.data?.length
|
||||||
) {
|
) {
|
||||||
logger.error(
|
logger.warn(
|
||||||
`⚠️ WARNING: Learning path "${hruid}" exists but contains no learning objects.`
|
`⚠️ WARNING: Learning path "${hruid}" exists but contains no learning objects.`
|
||||||
);
|
);
|
||||||
return [];
|
return [];
|
||||||
|
|
|
@ -32,7 +32,7 @@ export async function fetchLearningPaths(
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!learningPaths || learningPaths.length === 0) {
|
if (!learningPaths || learningPaths.length === 0) {
|
||||||
logger.error(`⚠️ WARNING: No learning paths found for ${source}.`);
|
logger.warn(`⚠️ WARNING: No learning paths found for ${source}.`);
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
source,
|
source,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue