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

fix: return proper error when HTTP calls fail on validate #869

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions utils/defaulter.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ func (d *Defaulter) getEntitySchema(entityType string) (map[string]interface{},
return schema, err
}
resp, err := d.client.Do(d.ctx, req, &schema)
if resp == nil {
return schema, fmt.Errorf("invalid HTTP response: %w", err)
}
// in case the schema is not found - like in case of EE features,
// no error should be returned.
if resp.StatusCode == http.StatusNotFound {
Expand Down