Enhance scouting server to pick up local `scouting_config.json`
I'm tired of manually specifying the config on the command line. It's
simpler to set the default such that it picks up the
`scouting_config.json` file from the local directory.
I also took this opportunity to enhance the docs for the flag. The
`year` and `event_code` fields are pretty much required now.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I3687d6d77e3433aaad0918904f83901c988cccdd
diff --git a/scouting/scraping/scrape.go b/scouting/scraping/scrape.go
index 9cb2336..c6aa6f4 100644
--- a/scouting/scraping/scrape.go
+++ b/scouting/scraping/scrape.go
@@ -78,7 +78,7 @@
defer resp.Body.Close()
if resp.StatusCode != 200 {
- return nil, errors.New(fmt.Sprint("Got unexpected status code from TBA API request: ", resp.Status))
+ return nil, errors.New(fmt.Sprint("Got unexpected status code from TBA API request ", req.URL, ": ", resp.Status))
}
// Get all bytes from response body.