Polkadex-Substrate / Polkadex-Open-Beta

12 stars 3 forks source link

DynamoDbException - listMainAccountsByEmail graphql query is called incorrectly during login process without required argument #456

Open jaymansfield opened 1 year ago

jaymansfield commented 1 year ago

After clicking "Log In" from https://orderbook.polkadex.trade/signIn the listMainAccountsByEmail graphql API is called without an argument first resulting in a DynamoDbException. It happens every time someone logins. The code executing this should check if they have an email first before firing off the call.

Example: image

Response:

image

{"data":{"listMainAccountsByEmail":null},"errors":[{"path":["listMainAccountsByEmail"],"data":null,"errorType":"DynamoDB:DynamoDbException","errorInfo":null,"locations":[{"line":2,"column":3,"sourceName":null}],"message":"One or more parameter values are not valid. The AttributeValue for a key attribute cannot contain an empty string value. Key: hash_key (Service: DynamoDb, Status Code: 400, Request ID: C75GP4DE30N9TV9NH9UL17IDTFVV4KQNSO5AEMVJF66Q9ASUAAJG)"}]}

onchainaddress:{esm99RRxKvainDsRR6UHRcju4vNnAw1ouZEw64Yfn12tc6HpQ}