99designs / 99designs/gqlgen

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

Open
#2,609 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

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?

Contributor guide

Open the contributing guide

Research direction

Look at the error representer in gqlgen's source code, likely in the handler or execution packages. Check for exported error types or interfaces used by gqlgen for validation and parsing errors. Examine how errors are currently wrapped or typed to determine if there's a public way to distinguish them. Testing involves creating a custom error representer that filters errors based on type.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.