Share via


InvokeResponseFactory.ErrorResponse(InvokeResponseErrorCode, String) Method

Definition

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

Applies to