Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sungrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (s *Sungrow) Get(path string, params map[string]string, v any) error {
defer s.mu.Unlock()

if s.status != StatusConnected {
return errors.New("not connected")
return newSungrowDisconnectedError("not connected")
}

u := url.URL{Scheme: "https", Host: s.Host, Path: path}
Expand Down Expand Up @@ -313,7 +313,7 @@ func (s *Sungrow) Send(service string, params map[string]any, v any) error {
defer s.mu.Unlock()

if s.status != StatusConnected {
return errors.New("not connected")
return newSungrowDisconnectedError("not connected")
}

reconnect := func() error {
Expand Down