Add error codes to campaign errors
Created by: eseliger
Some of our resolvers return errors very purposefully, and we did document that some error will be returned, but not which or how to identify this specific error.
I tried making more clear what the error actually looks like and that people using the API can assert on them by adding an error code to them, through an Extensions field that graphql-go provides us with.
Merge request reports
Activity
Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff 98abec31146bf652f03dedd8917ec76d5baa1d80...983aff582563b49e7a004c4fe53f8eb4484a44af.
Notify File(s) @LawnGnome enterprise/internal/campaigns/resolvers/errors.go
enterprise/internal/campaigns/resolvers/resolver.go
enterprise/internal/campaigns/resolvers/resolver_test.goCreated by: codecov[bot]
Codecov Report
Merging #15059 into main will decrease coverage by
0.00%
. The diff coverage is45.45%
.@@ Coverage Diff @@ ## main #15059 +/- ## ========================================== - Coverage 52.38% 52.37% -0.01% ========================================== Files 1556 1557 +1 Lines 79617 79641 +24 Branches 7002 7058 +56 ========================================== + Hits 41704 41711 +7 - Misses 34174 34184 +10 - Partials 3739 3746 +7
Flag Coverage Δ #go 52.34% <45.45%> (-0.02%)
#integration 30.39% <ø> (+0.08%)
#storybook 25.84% <ø> (ø)
#typescript 52.44% <ø> (+0.01%)
#unit 34.10% <ø> (ø)
Impacted Files Coverage Δ ...nterprise/internal/campaigns/resolvers/resolver.go 65.25% <42.85%> (-1.71%)
enterprise/internal/campaigns/resolvers/errors.go 50.00% <50.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 81.44% <0.00%> (-4.13%)
client/web/src/repo/RepoContainer.tsx 78.70% <0.00%> (+0.92%)
...ient/web/src/search/input/LazyMonacoQueryInput.tsx 100.00% <0.00%> (+22.22%)
Please register or sign in to reply