feat: add ErrNoSuchMessage to pmapi

This commit is contained in:
James Houlahan
2020-04-16 17:32:30 +02:00
committed by Jakub Cuth
parent d1e63254f2
commit e1ecc11f38
5 changed files with 12 additions and 1 deletions

View File

@ -532,7 +532,13 @@ func (c *Client) GetMessage(id string) (msg *Message, err error) {
return
}
if res.StatusCode == http.StatusUnprocessableEntity {
err = ErrNoSuchMessage
return
}
msg, err = res.Message, res.Err()
return
}