InvokeResponseFactory.ErrorResponse(InvokeResponseErrorCode, String) Method
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.
Creates invoke response with error code and error message.
public static Microsoft.Bot.Builder.InvokeResponse ErrorResponse (Microsoft.TeamsFx.Conversation.InvokeResponseErrorCode errorCode, string errorMessage);
static member ErrorResponse : Microsoft.TeamsFx.Conversation.InvokeResponseErrorCode * string -> Microsoft.Bot.Builder.InvokeResponse
Public Shared Function ErrorResponse (errorCode As InvokeResponseErrorCode, errorMessage As String) As InvokeResponse
Parameters
- errorCode
- InvokeResponseErrorCode
The status code indicates the bot processing error, available values:
- 400 (BadRequest): indicate the incoming request was invalid.
- 500 (InternalServerError): indicate an unexpected error occurred.
- errorMessage
- String
The error message.
Returns
An instance of InvokeResponse