StatusCodes enum
HTTP status codes enumeration for agent hosting responses.
This enum provides a comprehensive set of HTTP status codes commonly used in agent hosting scenarios, including success, redirection, client error, and server error status codes.
Fields
OK = 200 | The request has succeeded. Standard response for successful HTTP requests. |
CREATED = 201 | The request has been fulfilled and resulted in a new resource being created. Typically returned when a new agent, conversation, or resource is successfully created. |
MULTIPLE_CHOICES = 300 | Indicates multiple options for the resource that the client may follow. Used when there are multiple possible responses or resource locations available. |
BAD_REQUEST = 400 | The server cannot or will not process the request due to a client error. Returned when the request contains invalid syntax, malformed parameters, or violates agent hosting protocol requirements. |
UNAUTHORIZED = 401 | The request requires user authentication. Indicates that the client must authenticate itself to get the requested response. Common in agent scenarios requiring valid authentication tokens or credentials. |
NOT_FOUND = 404 | The requested resource could not be found. Returned when the specified agent, conversation, or endpoint does not exist or is not accessible with the current permissions. |
METHOD_NOT_ALLOWED = 405 | The request method is not allowed for the requested resource. Indicates that the HTTP method used is not supported for the specific agent endpoint or resource being accessed. |
CONFLICT = 409 | The request could not be completed due to a conflict with the current state of the resource. Common when attempting to create duplicate resources or when agent state conflicts prevent the operation from completing. |
PRECONDITION_FAILED = 412 | The server does not meet one of the preconditions specified by the client. Returned when conditional requests fail, such as when required headers or agent capabilities are not present or valid. |
UPGRADE_REQUIRED = 426 | The client should switch to a different protocol. Used to indicate that the agent hosting service requires a protocol upgrade or different communication method to fulfill the request. |
INTERNAL_SERVER_ERROR = 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. Generic error message when an unexpected agent hosting error occurs and no more specific message is suitable. |
NOT_IMPLEMENTED = 501 | The server does not support the functionality required to fulfill the request. Returned when the agent hosting service does not implement the requested feature or capability. |
BAD_GATEWAY = 502 | The server received an invalid response from the upstream server. Common when agent hosting services depend on external services that return invalid or malformed responses. |