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

Function OpenAIErrorResponse

coderd/x/chatd/chattest/errors.go:59–67  ·  view source on GitHub ↗

OpenAIErrorResponse returns an OpenAIResponse that causes the test server to respond with the given HTTP status code and error.

(statusCode int, errorType, message string)

Source from the content-addressed store, hash-verified

57// OpenAIErrorResponse returns an OpenAIResponse that causes the
58// test server to respond with the given HTTP status code and error.
59func OpenAIErrorResponse(statusCode int, errorType, message string) OpenAIResponse {
60 return OpenAIResponse{
61 Error: &ErrorResponse{
62 StatusCode: statusCode,
63 Type: errorType,
64 Message: message,
65 },
66 }
67}
68
69// OpenAIRateLimitResponse returns a 429 rate limit error.
70func OpenAIRateLimitResponse() OpenAIResponse {

Calls

no outgoing calls