view error handling context update and cleanup

This commit is contained in:
Michael 2019-06-22 01:11:14 +01:00
parent ac85512df4
commit 64c9ea0158

3
api.go
View File

@ -27,8 +27,7 @@ func Request(path string) ([]byte, *HTTPError) {
req, err := http.NewRequest("GET", url(path), nil) req, err := http.NewRequest("GET", url(path), nil)
if err != nil { if err != nil {
log.Println("Error reading request. ", err) log.Println("Error reading request. ", err)
return nil, &HTTPError{Status: "500 Internal Server Error", StatusCode: 500} return nil, &HTTPError{Status: "500 Internal Server Error", StatusCode: 500}
} }
head, er := Header() head, er := Header()