forked from Silverfish/proton-bridge
feat: add ErrNoSuchMessage to pmapi
This commit is contained in:
committed by
Jakub Cuth
parent
d1e63254f2
commit
e1ecc11f38
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user