Class ValidationException
- Namespace
- DynaSharp
- Assembly
- DynaSharp.dll
DynamoDB rejected the request: a malformed expression, a key that does not match the schema, an empty key, an item over 400 KB. Not retried: the request must change.
public sealed class ValidationException : DynamoDbException, ISerializable
- Inheritance
-
ValidationException
- Implements
- Inherited Members
Remarks
A command of the table API writes every attribute name and value as a placeholder, so the message of the service talks about #n2
and :v3. For such a failure Expressions, ExpressionNames and ExpressionValueTypes
say what those stand for, and Message gains one line with the same content. Values are never included, only
their types, so the exception is as safe to log as any other. A request of the request API has none of this: its caller wrote the
expressions. IsTransient is false.
Constructors
ValidationException(string, string?, HttpStatusCode)
Initializes a new instance of the ValidationException class.
public ValidationException(string message, string? requestId = null, HttpStatusCode statusCode = HttpStatusCode.BadRequest)
Parameters
messagestringThe error message returned by DynamoDB.
requestIdstringThe AWS request id, if known.
statusCodeHttpStatusCodeThe HTTP status code of the response.
Properties
ExpressionNames
Gets what the name placeholders of Expressions stand for, for example #n0 with status.
public IReadOnlyDictionary<string, string>? ExpressionNames { get; }
Property Value
ExpressionValueTypes
Gets the type descriptors of the value placeholders of Expressions, for example :v0 with S. The values themselves are
left out on purpose.
public IReadOnlyDictionary<string, string>? ExpressionValueTypes { get; }
Property Value
Expressions
Gets the expressions of the rejected command as sent, by the name of the request member, for example ConditionExpression with
#n0 = :v0. null for a failure of the request API, and for a command without expressions.
public IReadOnlyDictionary<string, string>? Expressions { get; }
Property Value
Message
Gets the message of the service, followed for a command by a line that explains the placeholders.
public override string Message { get; }