mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-21 13:54:18 +00:00
Add extra error check after unmarshal
This commit is contained in:
parent
bcb2100169
commit
a93eed6e56
@ -2575,6 +2575,9 @@ func (s *SignalClient) RemoteDelete(number string, recipient string, timestamp i
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(rawData), &resp)
|
||||
if err != nil {
|
||||
return resp, errors.New("Couldn't process request - invalid signal-cli response")
|
||||
}
|
||||
|
||||
return resp, err
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user