more improvements on axios and spotify api error handling, logging, other corrections

This commit is contained in:
2024-08-07 02:46:41 +05:30
parent 379ffa22ac
commit b7d6f06ff2
9 changed files with 262 additions and 273 deletions

View File

@@ -21,10 +21,12 @@ const validate = (req, res, next) => {
[err.path]: err.msg
}));
return res.status(400).json({
res.status(400).json({
message: getNestedValuesString(extractedErrors),
errors: extractedErrors
});
logger.warn("invalid request", { extractedErrors });
return;
}
module.exports = {