Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report errored field name when exiting on checkFieldType #935

Open
ermik opened this issue Jun 5, 2020 · 0 comments
Open

Report errored field name when exiting on checkFieldType #935

ermik opened this issue Jun 5, 2020 · 0 comments

Comments

@ermik
Copy link

ermik commented Jun 5, 2020

cayley/schema/loader.go

Lines 325 to 329 in ab2941b

f := rt.Field(i)
name := f.Name
if err := checkFieldType(f.Type); err != nil {
return err
}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant