2024-07-19 08:03:35 +00:00
|
|
|
package error
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
const (
|
2024-08-09 20:45:25 +00:00
|
|
|
UserIDIsEmpty = "PostID cannot be empty"
|
|
|
|
UserIDToShort = "PostID needs to be 25 characters long"
|
|
|
|
SourceIDEmpty = "SourceID cannot be empty"
|
|
|
|
SourceIDToShort = "SourceID needs to be 25 characters long"
|
|
|
|
UserSourceIDEmpty = "UserSourceID cannot be empty"
|
|
|
|
UserSourceIDToShort = "UserSourceID needs to be 25 characters long"
|
|
|
|
TagIDEmpty = "tagID cannot be empty"
|
|
|
|
UserFavoriteListIsEmpty = "userFavoriteList cannot be empty"
|
|
|
|
UserFavoriteIDIsEmpty = "userFavoriteID cannot be empty"
|
|
|
|
UserFavoriteIDToShort = "UserFavoriteID needs to be 25 characters long"
|
|
|
|
|
|
|
|
BatchSizeIsEmpty = "batchSize cannot be empty"
|
2024-07-19 08:03:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type EntityValidationFailed struct {
|
|
|
|
Reason string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e EntityValidationFailed) Error() string {
|
|
|
|
return fmt.Sprintf("Entity validation failed: %s", e.Reason)
|
|
|
|
}
|