Skip to content

Commit da15835

Browse files
committed
🐛 manage bad token
1 parent db89166 commit da15835

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,3 @@ docker run -v $(pwd)/migrations:/migrations --network host migrate/migrate -path
8282

8383
- [ ] display user in interface and labels
8484
- [ ] configure interval / notification frequency
85-
- [ ] error if bad gh token

internal/stars.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ func fetchQueryResults(cursor string) (GhQuery, error) {
179179
if err != nil {
180180
log.Fatalf("Error sending request: %v", err)
181181
}
182+
if resp.StatusCode != http.StatusOK {
183+
log.Fatal("Error sending request", "status", resp.Status)
184+
}
182185
defer closeBody(resp.Body)
183186

184187
// Read the response

0 commit comments

Comments
 (0)