feat(account): #49 refactor error handling
This commit is contained in:
@@ -45,5 +45,11 @@ func (r *RandomImpl) String(size int) (string, error) {
|
||||
}
|
||||
|
||||
func (r *RandomImpl) UUID() (uuid.UUID, error) {
|
||||
return uuid.NewRandom()
|
||||
id, err := uuid.NewRandom()
|
||||
if err != nil {
|
||||
log.Error("Error generating random UUID: %v", err)
|
||||
return uuid.Nil, types.ErrInternal
|
||||
}
|
||||
|
||||
return id, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user