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
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