Skip to content

Commit

Permalink
feat: log http (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariloufarmer authored Oct 24, 2024
1 parent 7ce6e7d commit 0af9216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (

func ExtractReadOnlyTraits(url string) (map[string]bool, error) {
// Retrieve the schema data
log.Info().Msg(fmt.Sprintf("Getting schema: %s", url))
resp, err := http.Get(url)
if err != nil {
log.Error().Msg(fmt.Sprintf("Failed to get schema: %s\nWith error: %s", url, err.Error()))
log.Error().Msg(fmt.Sprintf("Failed to get schema with error: %s", err.Error()))
return nil, err
}
body, err := io.ReadAll(resp.Body)
Expand Down

0 comments on commit 0af9216

Please sign in to comment.