fix: error message kapasitas upload profile picture mentor

This commit is contained in:
Muhammad Zhafran Ilham
2026-06-25 23:06:17 +07:00
parent d444d18d45
commit 786f2530f1
@@ -56,11 +56,15 @@ const mentorProfileUploadErrorHandler = (err, req, res, next) => {
}
if (err instanceof multer.MulterError) {
const message = err.code === 'LIMIT_FILE_SIZE'
? 'Profile picture maksimal 2MB'
: err.message;
return response(
res,
'fail',
error(new BadRequestError(err.message)),
err.message,
error(new BadRequestError(message)),
message,
ERROR.BAD_REQUEST
);
}