99designs / 99designs/gqlgen

How to know if the error in error representer is a gqlgen error

未关闭
#2,609 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
10.8k
派生
1.3k
平均合并
2 天 36 分钟
30 天内合并 PR
26

描述

In gqlgen error representer I want to just add the error types I know + gqlgen errors (validation parsing etc) and ignore other errors and show just a generic internal server error msg.

I can handle my own error types using errors.As. What should I do for gqlgen's errors? is there an exported type?

贡献指南

打开贡献指南

调研方向

查看 gqlgen 源代码中的 error representer,可能在 handler 或 execution 包中。检查 gqlgen 用于 validation 和 parsing errors 的已导出 error types 或 interfaces。研究当前 errors 是如何被 wrapped 或 typed 的,以确定是否有公开方式区分它们。测试包括创建一个 custom error representer,基于 type 过滤 errors。

由索引模型根据 Issue 内容生成。

评估

技术栈
go
领域
api, backend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。