hotfix(postgres):lab4 wrap raw error in MessageRepo.Create
This commit is contained in:
@@ -33,7 +33,7 @@ func (r *MessageRepo) Create(ctx context.Context, m *domain.Message) error {
|
|||||||
if checkViolation(err) {
|
if checkViolation(err) {
|
||||||
return &domain.ValidationError{Field: "text", Message: "нарушено ограничение"}
|
return &domain.ValidationError{Field: "text", Message: "нарушено ограничение"}
|
||||||
}
|
}
|
||||||
return err
|
return mapError(err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user