Skip to content

Commit 80520ac

Browse files
committed
helpful error message
1 parent c0e7a78 commit 80520ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/searchquery/search.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func Workspaces(query string, page codersdk.Pagination, agentInactiveDisconnectT
138138
return paramMatch{name: parts[0], value: nil}, nil
139139
}
140140
if len(parts) == 2 {
141+
if parts[1] == "" {
142+
return paramMatch{}, xerrors.Errorf("query element %q has an empty value. omit the '=' to match just on the parameter name", v)
143+
}
141144
// Match on the parameter and value
142145
return paramMatch{name: parts[0], value: &parts[1]}, nil
143146
}

0 commit comments

Comments
 (0)