Skip to content

Iter3#2

Open
StasMerzlyakov wants to merge 49 commits intomasterfrom
iter3
Open

Iter3#2
StasMerzlyakov wants to merge 49 commits intomasterfrom
iter3

Conversation

@StasMerzlyakov
Copy link
Owner

No description provided.

…ализация обновления баланса по начислениям
…ного пользователя)

экспериментирую с plantuml - добавил диаграмму таблиц
логгер для бизнес-операций берется из контекста
if err != nil {
return nil, fmt.Errorf("%w: %v", domain.ErrServerInternal, err.Error())
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ты ниже так много раз вызываешь resp.StatusCode()
Может лучше уж переменную сделать

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поправил


if orderData == nil {
logger.Errorw("storage.UpdateBalanceByOrder", "err", "orderData is nil")
return fmt.Errorf("%w: orderData is nil", domain.ErrServerInternal)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это же не ошибка сервера что данные пустые

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идея была такая - что если данные нулевые - то это ошибка в реализации/кофигурации.
Добавил ErrServerImplementationError для таких случаев.

return err
}

rows, err := st.pPool.Query(ctx,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не совсем понимаю ты делаешь Query
Это же просто Exec

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Убрал метод как неиспользуемый.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants