mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fixed merge error. Tests all passing
This commit is contained in:
parent
228d52cc7c
commit
dc0b252564
@ -43,13 +43,15 @@ module.exports = {
|
||||
throw new this.serverless.classes
|
||||
.Error(errorMessage);
|
||||
}
|
||||
method = method.toLowerCase();
|
||||
|
||||
const allowedMethods = [
|
||||
'get', 'post', 'put', 'patch', 'options', 'head', 'delete', 'any',
|
||||
];
|
||||
if (allowedMethods.indexOf(method) === -1) {
|
||||
const errorMessage = [
|
||||
`Invalid APIG method "${method}" in function "${functionName}".`,
|
||||
` AWS supported methods are: ${allowedMethods.join(", ")}.`,
|
||||
` AWS supported methods are: ${allowedMethods.join(', ')}.`,
|
||||
].join('');
|
||||
throw new this.serverless.classes.Error(errorMessage);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user