Updated fetch input error message
This commit is contained in:
parent
1ba622901e
commit
40e7ec808d
1 changed files with 1 additions and 3 deletions
|
|
@ -9,8 +9,6 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
// https://adventofcode.com/2024/day/{day}/answer
|
||||
|
||||
func retrieveInput(day int) error {
|
||||
cookieValue := os.Getenv("COOKIE")
|
||||
if cookieValue == "" {
|
||||
|
|
@ -47,7 +45,7 @@ func retrieveInput(day int) error {
|
|||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return errors.New(fmt.Sprintf("Unexpected status code: %d\nBody: %s", resp.StatusCode, string(body)))
|
||||
return errors.New(fmt.Sprintf("Unexpected status code: %d\n%s", resp.StatusCode, string(body)))
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("./day%02d/input.txt", day)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue