Share via


ResponseMessage.EnsureSuccessStatusCode Method

Definition

Checks if the current ResponseMessage has a successful status code, otherwise, throws.

public virtual Microsoft.Azure.Cosmos.ResponseMessage EnsureSuccessStatusCode ();
abstract member EnsureSuccessStatusCode : unit -> Microsoft.Azure.Cosmos.ResponseMessage
override this.EnsureSuccessStatusCode : unit -> Microsoft.Azure.Cosmos.ResponseMessage
Public Overridable Function EnsureSuccessStatusCode () As ResponseMessage

Returns

The current ResponseMessage.

Exceptions

An instance of CosmosException representing the error state.

Applies to