diff --git a/internal/pkg/apperrors/errors.go b/internal/pkg/apperrors/errors.go index b03c035..793dfee 100644 --- a/internal/pkg/apperrors/errors.go +++ b/internal/pkg/apperrors/errors.go @@ -67,8 +67,11 @@ const ( OrganizationConfigAlreadyPresent = CustomError("Organization config already present") InvalidRewardMultiplier = CustomError("Reward multiplier should greater than 1") InvalidRewardQuotaRenewalFrequency = CustomError("Reward renewal frequency should greater than 1") - InvalidTimezone = CustomError("Enter valid timezone") - DescriptionLengthBelowLimit = CustomError("The description should be at least 150 characters long") + + InvalidTimezone = CustomError("Enter valid timezone" + DescriptionLengthExceed = CustomError("The description should be at least 150 characters long") + + InvalidPageSize = CustomError("Invalid page size") InvalidPage = CustomError("Invalid page value") NegativeGradePoints = CustomError("Grade points cannot be negative") diff --git a/internal/pkg/dto/appreciation.go b/internal/pkg/dto/appreciation.go index 8af4f5e..e2b41de 100644 --- a/internal/pkg/dto/appreciation.go +++ b/internal/pkg/dto/appreciation.go @@ -76,6 +76,7 @@ func (appr *Appreciation) ValidateCreateAppreciation() (err error) { } if len(appr.Description) < 150 { + return apperrors.DescriptionLengthBelowLimit }