Compare commits

...

2 Commits

Author SHA1 Message Date
nityanandagohain
c99a112dc7 fix: set default only if not present 2024-03-30 20:02:03 +05:30
nityanandagohain
e4d9c4e239 fix: error check 2024-03-30 19:39:52 +05:30
2 changed files with 9 additions and 2 deletions

View File

@@ -4835,6 +4835,9 @@ func (r *ClickHouseReader) GetListResultV3(ctx context.Context, query string) ([
}
func getPersonalisedError(err error) error {
if err == nil {
return nil
}
if strings.Contains(err.Error(), "code: 307") {
return errors.New("query is consuming too much resources, please reach out to the team")
}

View File

@@ -154,8 +154,12 @@ func enrichFieldWithMetadata(field v3.AttributeKey, fields map[string]v3.Attribu
}
// enrich with default values if metadata is not found
field.Type = v3.AttributeKeyTypeTag
field.DataType = v3.AttributeKeyDataTypeString
if field.Type == "" {
field.Type = v3.AttributeKeyTypeTag
}
if field.DataType == "" {
field.DataType = v3.AttributeKeyDataTypeString
}
return field
}