Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

second app instance not working #9

Open
Jeff17Robbins opened this issue Jul 21, 2020 · 1 comment
Open

second app instance not working #9

Jeff17Robbins opened this issue Jul 21, 2020 · 1 comment

Comments

@Jeff17Robbins
Copy link

Jeff17Robbins commented Jul 21, 2020

The createCanvas call throws an error, and the error handling code assumes that the error object has a data object, but that object is null. The error message is:

The conditional request failed (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ConditionalCheckFailedException; Request ID: CDG8DQK720CJA210C65IH2T7E3VV4KQNSO5AEMVJF66Q9ASUAAJG)

image

image

@Jeff17Robbins
Copy link
Author

Apparently AppSync's behavior must have changed since this app was written. Changing the resolver for Mutation.createCanvas
to this seems to fix the problem.

#if( $ctx.error )
#if ( $ctx.error.type.equals("DynamoDB:ConditionalCheckFailedException") )
$util.toJson($ctx.result)
#else
$util.error($ctx.error.message, $ctx.error.type)
#end
#else
$util.toJson($ctx.result)
#end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant