Skip to content

Commit e3fe7bf

Browse files
committed
docstore: clarifying errors with comments
1 parent 75e787b commit e3fe7bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docstore/awsdynamodbv2/dynamo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ func (c *collection) ErrorCode(err error) gcerrors.ErrorCode {
776776
}
777777

778778
var errorCodeMap = map[string]gcerrors.ErrorCode{
779+
// handled by type above
779780
// "ConditionalCheckFailedException": gcerrors.FailedPrecondition,
780781
// "IdempotentParameterMismatchException": gcerrors.InvalidArgument,
781782
// "InternalServerErrorException": gcerrors.Internal,
@@ -786,7 +787,8 @@ var errorCodeMap = map[string]gcerrors.ErrorCode{
786787
// "TransactionCanceledException": gcerrors.FailedPrecondition,
787788
// "TransactionConflictException": gcerrors.Internal,
788789
// "TransactionInProgressException": gcerrors.InvalidArgument,
789-
"ValidationErrorException": gcerrors.InvalidArgument,
790+
791+
// V2 doesn't have a type for this, inspect message instead
790792
"ValidationException": gcerrors.InvalidArgument,
791793
}
792794

0 commit comments

Comments
 (0)