Skip to content

Commit

Permalink
deduplicate error messages for better tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Aug 4, 2023
1 parent 7090ea3 commit 7e4ea33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions schema/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func GetEntityNamesFromSchema(filename string) (entities []string, err error) {
Input: string(graphqlSchemaContent),
})
if gqlErr != nil {
return nil, fmt.Errorf("parsing gql: %w", gqlErr)
return nil, fmt.Errorf("getting entity names: parsing gql: %w", gqlErr)
}

for _, def := range graphqlSchemaDoc.Definitions {
Expand All @@ -88,7 +88,7 @@ func getEntitiesFromSchemaData(graphqlSchemaContent []byte) (entities []*EntityD
Input: string(graphqlSchemaContent),
})
if gqlErr != nil {
return nil, fmt.Errorf("parsing gql: %w", gqlErr)
return nil, fmt.Errorf("parsing schema content: %w", gqlErr)
}

for _, def := range graphqlSchemaDoc.Definitions {
Expand Down

0 comments on commit 7e4ea33

Please sign in to comment.