respondsError
Specifies an error response for a given request scenario. This allows defining the characteristics of an erroneous response, such as the HTTP status, response body, headers, delay, and more.
Parameters
A lambda function applied to a ResponseDefinitionBuilder, used to configure the error response properties such as the body, status, headers, and other attributes.
Type Parameters
The type of the response body for the error response.
Specifies an erroneous response for a completions request.
This method enables defining the error response using a Consumer-like approach for interoperability with Java.
Parameters
a Consumer that configures the error response by applying specifications to an instance of the ResponseDefinitionBuilder. The ResponseDefinitionBuilder allows setting attributes such as the HTTP status, response body, headers, and more.
Type Parameters
The type of the response body for the error response.