Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(GraphQL): Remove github issues link from the error messages. #6036

Merged
merged 7 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions graphql/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ const (
errNoGraphQLSchema = "Not resolving %s. There's no GraphQL schema in Dgraph. " +
"Use the /admin API to add a GraphQL schema"
errResolverNotFound = "%s was not executed because no suitable resolver could be found - " +
"this indicates a resolver or validation bug " +
"(Please let us know : https://github.com/dgraph-io/dgraph/issues)"
"this indicates a resolver or validation bug. Please let us know by filing an issue."

// GraphQL schema for /admin endpoint.
graphqlAdminSchema = `
Expand Down
2 changes: 1 addition & 1 deletion graphql/api/panics.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ func PanicHandler(fn func(error)) {

fn(errors.Errorf("Internal Server Error - a panic was trapped. " +
"This indicates a bug in the GraphQL server. A stack trace was logged. " +
"Please let us know : https://github.com/dgraph-io/dgraph/issues."))
"Please let us know by filing an issue with the stack trace."))
}
}
2 changes: 1 addition & 1 deletion graphql/e2e/common/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func panicCatcher(t *testing.T) {
require.Equal(t, x.GqlErrorList{
{Message: fmt.Sprintf("Internal Server Error - a panic was trapped. " +
"This indicates a bug in the GraphQL server. A stack trace was logged. " +
"Please let us know : https://github.com/dgraph-io/dgraph/issues.")}},
"Please let us know by filing an issue with the stack trace.")}},
gqlResponse.Errors)

require.Nil(t, gqlResponse.Data, string(gqlResponse.Data))
Expand Down
3 changes: 1 addition & 2 deletions graphql/resolve/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,7 @@ func completeDgraphResult(
glog.Errorf("Could not process Dgraph result : \n%s", string(dgResult))
return nullResponse(
x.GqlErrorf("Couldn't process the result from Dgraph. " +
"This probably indicates a bug in the Dgraph GraphQL layer. " +
"Please let us know : https://github.com/dgraph-io/dgraph/issues.").
"This probably indicates a bug in Dgraph. Please let us know by filing an issue.").
WithLocations(field.Location()))
}

Expand Down
8 changes: 4 additions & 4 deletions graphql/schema/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ import (
func Introspect(q Query) (json.RawMessage, error) {
if q.Name() != "__schema" && q.Name() != "__type" && q.Name() != Typename {
return nil, errors.New("call to introspect for field that isn't an introspection query " +
"this indicates bug (Please let us know : https://github.com/dgraph-io/dgraph/issues)")
"this indicates bug. Please let us know by filing an issue.")
}

sch, ok := q.Operation().Schema().(*schema)
if !ok {
return nil, errors.New("couldn't convert schema to internal type " +
"this indicates bug (Please let us know : https://github.com/dgraph-io/dgraph/issues)")
"this indicates bug. Please let us know by filing an issue.")
}

op, ok := q.Operation().(*operation)
if !ok {
return nil, errors.New("couldn't convert operation to internal type " +
"this indicates bug (Please let us know : https://github.com/dgraph-io/dgraph/issues)")
"this indicates bug. Please let us know by filing an issue.")
}

qu, ok := q.(*query)
if !ok {
return nil, errors.New("couldn't convert query to internal type " +
"this indicates bug (Please let us know : https://github.com/dgraph-io/dgraph/issues)")
"this indicates bug. Please let us know by filing an issue.")
}

reqCtx := &requestContext{
Expand Down
2 changes: 1 addition & 1 deletion systest/export/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
ports:
- 5180:5180
- 6180:6180
command: /gobin/dgraph zero --cwd=/data/zero1 --my=zero1:5180 -o 100 --bindall --logtostderr -v=0
command: /gobin/dgraph zero --cwd=/data/zero1 --my=zero1:5180 -o 100 --bindall --logtostderr -v=0 --replicas 3
volumes:
- type: bind
source: $GOPATH/bin
Expand Down
5 changes: 2 additions & 3 deletions worker/graphql_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ import (
const (
errGraphQLSchemaCommitFailed = "error occurred updating GraphQL schema, please retry"
ErrGraphQLSchemaAlterFailed = "succeeded in saving GraphQL schema but failed to alter Dgraph" +
" schema - this indicates a bug in Dgraph schema generation. Please let us know : " +
"https://github.com/dgraph-io/dgraph/issues. " +
"Don't forget to post your old and new schemas in the issue description."
" schema - this indicates a bug in Dgraph schema generation. Please let us know by" +
" filing an issue. Don't forget to post your old and new schemas in the issue description."

GqlSchemaPred = "dgraph.graphql.schema"
gqlSchemaXidPred = "dgraph.graphql.xid"
Expand Down