ResponsesApiException Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exception that wraps a fully-formed Error model and an HTTP status code. Thrown when code needs to surface a structured API error that serializes directly to ApiErrorResponse. Maps to the specified StatusCode.
public class ResponsesApiException : Exception
type ResponsesApiException = class
inherit Exception
Public Class ResponsesApiException
Inherits Exception
- Inheritance
-
ResponsesApiException
Constructors
| Name | Description |
|---|---|
| ResponsesApiException(Error, Int32, Exception) |
Initializes a new instance of ResponsesApiException with an Error model, HTTP status code, and inner exception. |
| ResponsesApiException(Error, Int32) |
Initializes a new instance of ResponsesApiException with an Error model and HTTP status code. |
Properties
| Name | Description |
|---|---|
| Error |
Gets the structured error model to serialize in the API response body. |
| StatusCode |
Gets the HTTP status code to return. |