Skip to content

Commit

Permalink
refactor: use getter method for nodes and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
natalian98 committed Jun 20, 2024
1 parent f4d960c commit f1d630b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kratos/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@ func (s *Service) getUiError(responseBody io.ReadCloser) (err error) {

// if no message was found, search through nodes
if len(errorCodes) == 0 {
nodes := errorMessages.Ui.Nodes
nodes := errorMessages.Ui.GetNodes()
for _, node := range nodes {
// look for the node where error appears
for _, message := range node.Messages {
if message.Type == "error" {
errorCodes = node.Messages
errorCodes = node.GetMessages()
s.logger.Debugf("Messages: %s", errorCodes)
}
}
Expand Down

0 comments on commit f1d630b

Please sign in to comment.