We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b51b0a commit 6e74871Copy full SHA for 6e74871
linebot/webhook.go
@@ -24,11 +24,11 @@ import (
24
)
25
26
// ParseRequest method
27
-func (client *Client) ParseRequest(r *http.Request) (events []Event, err error) {
+func (client *Client) ParseRequest(r *http.Request) ([]Event, error) {
28
defer r.Body.Close()
29
body, err := ioutil.ReadAll(r.Body)
30
if err != nil {
31
- return
+ return nil, err
32
}
33
if !client.validateSignature(r.Header.Get("X-LINE-Signature"), body) {
34
return nil, ErrInvalidSignature
0 commit comments