{"record":{"id":"14e7f2d64c8ad8a3","repo":"gravitational/teleport","slug":"the-request-was-canceled","errorCode":null,"errorMessage":"the request was canceled","messagePattern":"the request was canceled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/srv/app/llm/errors/errors.go","lineNumber":35,"sourceCode":"package errors\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/gravitational/trace\"\n\n\t\"github.com/gravitational/teleport/lib/utils\"\n)\n\nvar (\n\t// ErrTimeout returned when the request times out.\n\tErrTimeout = errors.New(\"the request timed out. Try again or use streaming for long responses\")\n\t// ErrBadRequest returned when the request has bad format or invalid fields.\n\tErrBadRequest = errors.New(\"the inference provider rejected the request as invalid. Check the request body for unsupported or invalid fields\")\n\t// ErrCanceled returned when the request is canceled.\n\tErrCanceled = errors.New(\"the request was canceled\")\n\t// ErrUnauthorized returned when the request is unauthorized.\n\tErrUnauthorized = errors.New(\"the inference provider rejected the request due to authentication or authorization configuration. Contact your Teleport administrator\")\n\t// ErrRejected returned when the provider rejects the request.\n\tErrRejected = errors.New(\"the inference provider rejected the request due to usage limits. Contact your Teleport administrator\")\n\t// ErrUnsupported returned when the requested endpoint is not supported.\n\tErrUnsupported = errors.New(\"teleport doesn't support the requested endpoint, please check the list of supported endpoints in the documentation\")\n\t// ErrBadResponse returned when the provider replied the request with an unsupported message or format.\n\tErrBadResponse = errors.New(\"the inference provider returned an unexpected response. Contact your Teleport administrator\")\n\t// ErrConfig returned when the app or app service are misconfigured, requiring admin intervention.\n\tErrConfig = errors.New(\"unable to serve request due to an app configuration error. Contact your Teleport administrator\")\n\t// ErrInternal returned when there is a Teleport processing error (nothing to do with the inference provider).\n\tErrInternal = errors.New(\"unable to serve the request due to an internal error. Contact your Teleport administrator\")\n\t// ErrLimitExceeded returned when Teleport rejects the request due to limit exceeded.\n\tErrLimitExceeded = errors.New(\"tokens quota exceeded. Contact your Teleport administrator\")\n\t// ErrUnknown returned when the handler could not identify the error.\n\tErrUnknown = errors.New(\"the inference provider returned an unexpected error. Contact your Teleport administrator\")\n)\n","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/srv/app/llm/errors/errors.go#L17-L53","documentation":"Exported sentinel ErrCanceled for the LLM app-access proxy: the inference request was canceled, typically because the downstream client disconnected or the context was canceled; providers map it together with timeouts to a timeout error type.","triggerScenarios":"Thrown at lib/srv/app/llm/errors/errors.go:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No fix needed if the client intentionally canceled; otherwise retry the request","Avoid closing the client connection while waiting for long completions"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}