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

change deprecated usage of res.send #487

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
change deprecated usage of res.send
  • Loading branch information
dburandt committed Apr 27, 2020
commit a7fb1ed93221c934548cbb626d7b76d313531aa1
2 changes: 1 addition & 1 deletion src/ExpressReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class ExpressReceiver implements Receiver {
this.logger.debug('stored response sent');
}
} catch (err) {
res.send(500);
res.status(500).send();
Copy link
Member

Choose a reason for hiding this comment

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

Although the warning message suggests to use res.sendStatus(status), I prefer your change. In this case, a Slack app doesn't need to send any data in response body.

throw err;
}
}
Expand Down