Skip to content

Commit

Permalink
more log warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
s0up4200 committed May 12, 2023
1 parent 8815dbd commit e9235ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type ResponseData struct {
func hookAPIResponse(resp *http.Response) error {
contentType := resp.Header.Get("Content-Type")
if !strings.Contains(contentType, "application/json") {
log.Warn().Msgf("Unexpected content type: %s, likely wrong API key", contentType)
return fmt.Errorf("unexpected content type: %s", contentType)
}
return nil
Expand Down

0 comments on commit e9235ae

Please sign in to comment.