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

Bug : Standardize Promise Handling #15

Closed
2 tasks done
mathanraj0601 opened this issue Dec 29, 2023 · 4 comments
Closed
2 tasks done

Bug : Standardize Promise Handling #15

mathanraj0601 opened this issue Dec 29, 2023 · 4 comments
Assignees
Labels

Comments

@mathanraj0601
Copy link
Contributor

mathanraj0601 commented Dec 29, 2023

standardize Promise Handling

await sgMail
      .send(message)
      .then((response) => console.log("Email sent!"))
      .catch((error) => console.log(error.message))

    res.render("result", { pos: p, eng: e, mea: m, rel: r, acc: a 

In our codebase, there is a mix of using await and then/catch for handling promises. We need to standardize the approach to improve code consistency and maintainability.

Plan:

  • Removing promise then/catch
  • Adding ' try/catch` blocks for error handling
@mathanraj0601
Copy link
Contributor Author

I am excited to work on this @Aryainguz Can you assign me this for SWOC24?

@Aryainguz
Copy link
Owner

Great observation and thought @mathanraj0601 go ahead and feel free to reach out for any help!

@mathanraj0601
Copy link
Contributor Author

That's great @Aryainguz

@mathanraj0601
Copy link
Contributor Author

Hey @Aryainguz 🌟 I've submitted a PR for the task mentioned . While diving into the issue, I spotted some opportunities to enhance the code for better readability and error handling. So, I've create another issue or those improvements.

Could you kindly assign me to the linked issue (#29 ) ? I'm eager to kickstart the work and contribute to the project!

Aryainguz added a commit that referenced this issue Jan 2, 2024
Solve fixes : #15 : Fixed async operation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants