1 parent d6ccdad commit aaad1dfCopy full SHA for aaad1df
1 file changed
chapter2/sample/matchers/rss.go
@@ -3,6 +3,7 @@ package matchers
3
import (
4
"encoding/xml"
5
"errors"
6
+ "fmt"
7
"log"
8
"net/http"
9
"regexp"
@@ -125,7 +126,7 @@ func (m *rssMatcher) retrieve(feed *search.Feed) (*document, error) {
125
126
// Check the status code for a 200 so we know we have received a
127
// proper response.
128
if resp.StatusCode != 200 {
- return nil, err
129
+ return nil, fmt.Errorf("HTTP Response Error %d\n", resp.StatusCode)
130
}
131
132
// Decode the rss feed document into our struct type.
0 commit comments