better API error handling

This commit is contained in:
xfarrow
2024-03-14 15:45:10 +01:00
parent b2abaf7685
commit 35f04d70df
3 changed files with 6 additions and 3 deletions

View File

@ -8,4 +8,8 @@ function getCookie(name) {
}
}
return null;
}
function callbackErrors(errors, func) {
errors.forEach(error => func(error.msg));
}