MCPcopy Index your code
hub / github.com/coder/coder / ErrorExcessParams

Method ErrorExcessParams

coderd/httpapi/queryparams.go:45–54  ·  view source on GitHub ↗

ErrorExcessParams checks if any query params were passed in that were not parsed. If so, it adds an error to the parser as these values are not valid query parameters.

(values url.Values)

Source from the content-addressed store, hash-verified

43// parsed. If so, it adds an error to the parser as these values are not valid
44// query parameters.
45func (p *QueryParamParser) ErrorExcessParams(values url.Values) {
46 for k := range values {
47 if _, ok := p.Parsed[k]; !ok {
48 p.Errors = append(p.Errors, codersdk.ValidationError{
49 Field: k,
50 Detail: fmt.Sprintf("%q is not a valid query param", k),
51 })
52 }
53 }
54}
55
56func (p *QueryParamParser) addParsed(key string) {
57 p.Parsed[key] = true

Callers 15

provisionerDaemonsMethod · 0.95
returnDAUsInternalMethod · 0.95
chatCostSummaryMethod · 0.95
chatCostUsersMethod · 0.95
prInsightsMethod · 0.95
extractAuthorizeParamsFunction · 0.95
extractTokenRequestFunction · 0.95
AuditLogsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected