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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pendingTasks error handling #1606

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jinseok0
Copy link

@jinseok0 jinseok0 commented May 28, 2023

Summary:

when I put in the wrong AWS_SECRET_ACCESS_KEY, I get an error in the console but can't get out of the await promise.
so I checked the code and saw that there is no exception handling for await setupFlowPromise in /lib/Table/index.ts.

screenshot1

Code sample:

General

const dynamoose = require("dynamoose");

(async () => {
  console.log(1);
  const Cat = dynamoose.model("Cat", new dynamoose.Schema({ name: String }));
  try {
    console.log(2);
    await Cat.create({
      name: "cat",
    });
    console.log(3);
  } catch (error) {
    console.log(4);
  }
  console.log(5);
})();

Expectation

screenshot2

Other information:

Type (select 1):

  • Bug fix
  • Feature implementation
  • Documentation improvement
  • Testing improvement
  • Test added to report bug (GitHub issue #---- @---)
  • Something not listed here

Is this a breaking change? (select 1):

  • 馃毃 YES 馃毃
  • No
  • I'm not sure

Is this ready to be merged into Dynamoose? (select 1):

  • Yes
  • No

Are all the tests currently passing on this PR? (select 1):

  • Yes
  • No

Other:

  • I have read through and followed the Contributing Guidelines
  • I have searched through the GitHub pull requests to ensure this PR has not already been submitted
  • I have updated the Dynamoose documentation (if required) given the changes I made
  • I have added/updated the Dynamoose test cases (if required) given the changes I made
  • I agree that all changes made in this pull request may be distributed and are made available in accordance with the Dynamoose license
  • All of my commits and commit messages are detailed, explain what changes were made, and are easy to follow and understand
  • I have filled out all fields above

@jinseok0
Copy link
Author

I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@jinseok0
Copy link
Author

pr was closed and reopened. I also added a unit test as per your comment. @fishcharlie

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

This pull request is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

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

Successfully merging this pull request may close these issues.

None yet

2 participants