Tapo: add missing login errorcheck (#9056)
This commit is contained in:
parent
35c55f6636
commit
29db0fc472
1 changed files with 4 additions and 0 deletions
|
|
@ -104,6 +104,10 @@ func (d *Connection) Login() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := d.CheckErrorCode(res.ErrorCode); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
d.Token = res.Result.Token
|
||||
|
||||
deviceResponse, err := d.ExecMethod("get_device_info", false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue