Improve the content type error message by showing available content types#3532
Improve the content type error message by showing available content types#3532
Conversation
martinmr
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gitlw and @manishrjain)
dgraph/cmd/alpha/http.go, line 204 at r1 (raw file):
default: x.SetStatus(w, x.ErrorInvalidRequest, "Unsupported content type. "+ "Currently supported content types are application/json, application/graphqlpm")
minor: I think it's safe to remove the currently to make the message a bit shorter. It's implied that the message is referring to the current types.
danielmai
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gitlw and @manishrjain)
dgraph/cmd/alpha/http.go, line 203 at r1 (raw file):
default: x.SetStatus(w, x.ErrorInvalidRequest, "Unsupported content type. "+
Let's keep the original spelling of "Content-Type" so it's clearer this is referring to the header name.
dgraph/cmd/alpha/http.go, line 331 at r1 (raw file):
default: x.SetStatus(w, x.ErrorInvalidRequest, "Unsupported content type. "+
Let's keep the original spelling of "Content-Type" so it's clearer this is referring to the header name.
gitlw
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @danielmai, @manishrjain, and @martinmr)
dgraph/cmd/alpha/http.go, line 203 at r1 (raw file):
Previously, danielmai (Daniel Mai) wrote…
Let's keep the original spelling of "Content-Type" so it's clearer this is referring to the header name.
Done.
dgraph/cmd/alpha/http.go, line 331 at r1 (raw file):
Previously, danielmai (Daniel Mai) wrote…
Let's keep the original spelling of "Content-Type" so it's clearer this is referring to the header name.
Done.
This change is