mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
refactor: return ErrNoSuchAPIID any time we get 422
This commit is contained in:
@ -532,14 +532,7 @@ 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
|
||||
return res.Message, res.Err()
|
||||
}
|
||||
|
||||
type SendMessageReq struct {
|
||||
|
||||
Reference in New Issue
Block a user