Skip to content

Commit

Permalink
fix: error return in getServiceStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk committed Dec 5, 2023
1 parent 98abf8b commit b0c0720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ func (c *Client) postResource(resPath string, requestBody interface{}) ([]byte,

func (c *Client) getServiceStatus(resPath string) (*api.MetaMessage, error) {
resp, err := c.getResource(resPath)
if err != nil {
return nil, err
}
msg := &api.MetaMessage{}

if err := json.Unmarshal(resp, msg); err != nil {
return nil, err
}
return msg, err
return msg, nil
}

0 comments on commit b0c0720

Please sign in to comment.