Table of Contents

Class RequestValidationException

Namespace
Mailtrap.Core.Exceptions
Assembly
Mailtrap.Abstractions.dll

Exception which is thrown when the request passed to the Mailtrap API has an invalid format.

public sealed class RequestValidationException : MailtrapApiException, ISerializable
Inheritance
RequestValidationException
Implements
Inherited Members

Constructors

RequestValidationException(Uri, HttpMethod, ValidationResult)

Initializes a new instance of the exception with failed API details, defined by requestUri and httpMethod.
Additionally provides validationResult for request.
public RequestValidationException(Uri resourceUri, HttpMethod httpMethod, ValidationResult validationResult)

Parameters

resourceUri Uri
API endpoint that thrown exception.
httpMethod HttpMethod
HTTP method that thrown exception.
validationResult ValidationResult

Validation result for request.

Exceptions

ArgumentNullException

When the requestUri or httpMethod is null.

ArgumentNullException

When the validationResult is null.

Properties

ValidationResult

Gets request validation result.

public ValidationResult ValidationResult { get; }

Property Value

ValidationResult

Request validation result.