Skip to content

Commit 1522c28

Browse files
committed
Add early return in docs
1 parent 451c038 commit 1522c28

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ app.post(
9797
try {
9898
data = webhook.verify(payload, headers)
9999
} catch {
100-
res.status(400).send()
100+
return res.status(400).send()
101+
101102
}
102103

103104
storeEvent(data, (err) => {
104105
if (err != null) {
105-
res.status(500).send()
106-
return
106+
return res.status(500).send()
107+
107108
}
108109
res.status(204).send()
109110
})

0 commit comments

Comments
 (0)