cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.83k stars 1.25k forks source link

Report errored field name when exiting on checkFieldType #935

Open ermik opened 4 years ago

ermik commented 4 years ago

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

Wrap error if supporting Go 1.13

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.