Skip to content

Skunkworks 2024! #96

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

Merged
merged 30 commits into from
Oct 24, 2024
Merged

Skunkworks 2024! #96

merged 30 commits into from
Oct 24, 2024

Conversation

vstehlik
Copy link
Contributor

  • Updates to dependencies

@@ -46,7 +44,8 @@ export const setUserPresence = async (email: string, token: string | undefined,
const slackClient = new WebClient(token);

try {
await slackClient.users.setPresence({ presence });
const result = await slackClient.users.setPresence({ presence });
throw result.error;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to throw the error or just log it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think throwing is still good 🤔 The handleError function ends up checking the error message and if it's "token_revoked" or "invalid_auth" it clears the tokens and sends the user a message in Slack to re-auth.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does this need to be wrapped in a conditional statement then to only throw if there is an error?

Copy link
Contributor

Choose a reason for hiding this comment

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

Swapped to the the response ok boolean and only throw if that's missing/false!
2079346

Co-authored-by: Val Stehlik <[email protected]>
@ppoulsen ppoulsen merged commit c45cddc into master Oct 24, 2024
3 checks passed
@ppoulsen ppoulsen deleted the SK24-UpdateDependencies branch October 24, 2024 15:47
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

Successfully merging this pull request may close these issues.

4 participants