Returning nil from the error presenter causes a panic
未關閉
- 主要語言
- Go
- 星號
- 10.8k
- 分支
- 1.3k
- 平均合併
- 2 天 36 分鐘
- 30 天內合併 PR
- 26
描述
### What happened?
I implemented the [error presenter](https://gqlgen.com/reference/errors/#the-error-presenter) and tried to return nil in an attempt to suppress a specific error. A panic then occurred on [this line](https://github.com/99designs/gqlgen/blob/v0.14.0/graphql/context_response.go#L113) stating `panic: interface conversion: error is *errors.errorString, not *gqlerror.Error`.
### What did you expect?
No panic and a suppressed error from the resulting response JSON.
### versions
- `gqlgen version`? 0.14.0
- `go version`? 1.17.3
- dep or go modules? go modules
貢獻指南
評估
這個 Issue 還沒有評估資料。