Skip to content

Commit 7cb82de

Browse files
committed
Handlers.get() throws 400 if missing parameters
1 parent 5d97b0f commit 7cb82de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

requests.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @param {Object} params The GET request parameters in object format
66
* @param {String} verify_token The verification token
77
* @returns {String} The challenge string, it must be the http response body
8+
* @throws {Number} 400 if the request is missing data
89
* @throws {Number} 403 if the verification tokens don't match
910
*/
1011
function get(params, verify_token) {
@@ -24,6 +25,9 @@ function get(params, verify_token) {
2425
throw 403;
2526
}
2627
}
28+
29+
// Responds with "400 Bad Request" if it's missing data
30+
throw 400;
2731
}
2832

2933
/**

0 commit comments

Comments
 (0)