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

Gracefully handle errors from the datastore.put response #48

Merged
merged 4 commits into from
Oct 30, 2023

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Aug 10, 2023

Type of change

  • New sample
  • New feature
  • Bug fix
  • Documentation

Summary

This PR adds error handling to the datastore.put call, returning an error if this call is unsuccessful. Related tests are also added.

Unsure if this is the ideal way to mock different responses or if this is how we'd like to handle this error case, so please feel free to suggest alternatives!

Notes

Mocked responses were updated to match https://api.slack.com/methods/apps.datastore.put#examples

Requirements

  • I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@zimeg zimeg added the enhancement New feature or request label Aug 10, 2023
@zimeg zimeg self-assigned this Aug 10, 2023
Copy link
Contributor

@hello-ashleyintech hello-ashleyintech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the super late review 🫣 LGTM! 🚀

@zimeg
Copy link
Member Author

zimeg commented Oct 30, 2023

@hello-ashleyintech no worries at all! The LGTM is always appreciated 🙌

@zimeg zimeg merged commit 224f178 into main Oct 30, 2023
2 checks passed
@zimeg zimeg deleted the datastore-errors branch October 30, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants