Skip to content

Fixes slack verification and timeout errors#2972

Merged
sean-brydon merged 18 commits intomainfrom
slack/bugs
Jun 11, 2022
Merged

Fixes slack verification and timeout errors#2972
sean-brydon merged 18 commits intomainfrom
slack/bugs

Conversation

@sean-brydon
Copy link
Member

What does this PR do?

Fixes slack timeout errors and verification failures and provides a more detailed error message to the user

Fixes #2970

Environment: Staging(main branch) / Production

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@vercel
Copy link

vercel bot commented Jun 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 5:40PM (UTC)
3 Ignored Deployments
Name Status Preview Updated
docs ⬜️ Ignored (Inspect) Jun 11, 2022 at 5:40PM (UTC)
swagger ⬜️ Ignored (Inspect) Jun 11, 2022 at 5:40PM (UTC)
ui ⬜️ Ignored (Inspect) Jun 11, 2022 at 5:40PM (UTC)

}

if (req.method === "GET") {
if (!req.session?.user?.id) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Duplicate code - check is a few lines above

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "POST") {
const command = req.body.command.split("/").pop();
await slackVerify(req, res);
Copy link
Member Author

Choose a reason for hiding this comment

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

Slack dousing expect you to verify on commands - hence the verification failing

view: CreateEventModal(data),
});
res.status(200).end();
return res.status(200).end();
Copy link
Member Author

Choose a reason for hiding this comment

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

Was never returning here - Hence the timeout .... :(

Copy link
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

LGMT. Left just one comment

Copy link
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Made some improvements. Feel free to retest and merge

@zomars zomars added the ♻️ autoupdate tells kodiak to keep this branch up-to-date label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ autoupdate tells kodiak to keep this branch up-to-date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack Verification + Request Timeout

3 participants