MCPcopy Create free account
hub / github.com/docker/docker-agent / errTypeFor

Function errTypeFor

pkg/chatserver/server.go:655–660  ·  view source on GitHub ↗
(status int)

Source from the content-addressed store, hash-verified

653}
654
655func errTypeFor(status int) string {
656 if status >= 500 {
657 return "internal_error"
658 }
659 return "invalid_request_error"
660}
661
662// validateSamplingParams range-checks the OpenAI sampling fields. Even when
663// we don't yet plumb them all the way through to the model, validating up

Callers 2

writeErrorFunction · 0.85
TestErrTypeForFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestErrTypeForFunction · 0.68