MCPcopy Create free account
hub / github.com/exercism/cli / errorResponse429

Function errorResponse429

cmd/cmd_test.go:138–150  ·  view source on GitHub ↗
(retryAfter string)

Source from the content-addressed store, hash-verified

136}
137
138func errorResponse429(retryAfter string) *http.Response {
139 body := ""
140 response := &http.Response{
141 Status: "429 Too Many Requests",
142 StatusCode: 429,
143 Header: make(http.Header),
144 Body: ioutil.NopCloser(strings.NewReader(body)),
145 ContentLength: int64(len(body)),
146 }
147 response.Header.Set("Content-Type", "text/plain")
148 response.Header.Set("Retry-After", retryAfter)
149 return response
150}
151
152func TestDecodeErrorResponse(t *testing.T) {
153 testCases := []struct {

Callers 1

TestDecodeErrorResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected