Skip to content

Commit c76313a

Browse files
committed
address some coderabbit nitpicks
1 parent a855536 commit c76313a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pkg/filter/filterable.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ func (f FilterItem) toBQStr(filterable Filterable, paramIndex int) (sql string,
244244
makeNumParam := func() []bigquery.QueryParameter {
245245
num, err := strconv.ParseFloat(f.Value, 64)
246246
if err != nil {
247+
log.Errorf("Failed to parse numeric filter value %q for field %s: %v", f.Value, f.Field, err)
248+
247249
return makeParam("NOT A NUMBER: " + f.Value) // which will break appropriately
248250
}
249251
return makeParam(num)
@@ -306,6 +308,7 @@ func (f FilterItem) toBQStr(filterable Filterable, paramIndex int) (sql string,
306308
return fmt.Sprintf("%s IS %s NULL", field, optNot(!f.Not)), nil
307309
}
308310

311+
log.Errorf("Unknown filter operator %q for field %s", f.Operator, f.Field)
309312
return "UnknownFilterOperator()", nil // cause SQL to fail in obvious way
310313
}
311314

sippy-ng/src/jobs/JobRunsTable.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ export default function JobRunsTable(props) {
361361
fetch(process.env.REACT_APP_API_URL + '/api/labels')
362362
.then((response) => {
363363
if (response.status !== 200) {
364+
console.warn(
365+
'Labels API returned unsuccessful status: ' + response.statusText
366+
)
364367
return {}
365368
}
366369
return response.json()

0 commit comments

Comments
 (0)