BadRequest() public static method

Creates a fault exception with the HTTP status code 400.
public static BadRequest ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
return HttpResponseException
 /// <summary>
 /// Returns exception when the Iap validation fails.
 /// </summary>
 /// <param name="details">Fault message.</param>
 /// <returns>Exception wrapping the fault.</returns>
 public static HttpResponseException IapValidationException(string details)
 {
     return(ServiceFault.BadRequest(
                Source,
                IapValidationError,
                "Iap could not be validated.",
                details));
 }
 /// <summary>
 /// Returns an exception wrapping a fault response indicating that the Uri Id and the request body Id differ.
 /// </summary>
 /// <param name="pathArgumentId">Id from the Uri path argument.</param>
 /// <param name="requestId">Id from the request body.</param>
 /// <returns>Exception wrapping the fault response.</returns>
 public static HttpResponseException IdMismatchException(string pathArgumentId, string requestId)
 {
     return(ServiceFault.BadRequest(
                Source,
                IdMismatch,
                "The ID value present in the URI differs from the one present in the request body.",
                pathArgumentId,
                requestId));
 }