cayleygraph / cayleygraph/cayley

Report errored field name when exiting on checkFieldType

Open
#935 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/cayleygraph/cayley/blob/ab2941b35ef5088e26e1350e504fd55ba9630358/schema/loader.go#L325-L329

[Wrap](https://blog.golang.org/go1.13-errors) error if supporting Go 1.13
```go
fmt.Errorf("Unsupported field '%s'; err: %w", name, err)
```

Or simply inline underlying error via `%v`, as `loader.go` doesn't declare those as public error variables (e.g. `ErrArrayUnsupported`) to be checked against.

Contributor guide

Open the contributing guide

Research direction

Start in schema/loader.go around lines 325-329 and trace where checkFieldType returns its error. Update the resulting error so it identifies the unsupported field while preserving the underlying error, then verify that loader failures report the field name.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.