mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Add detail and recovery operation.
This commit is contained in:
parent
c3da897ec2
commit
d85a67cf37
@ -41,7 +41,17 @@ module.exports = {
|
||||
return this.provider.request('S3',
|
||||
'listObjectsV2',
|
||||
params
|
||||
).then((result) => {
|
||||
).catch((reason) => {
|
||||
if (!_.includes(reason.message, 'The specified bucket does not exist')) {
|
||||
return BbPromise.reject(reason);
|
||||
}
|
||||
const stackName = this.provider.naming.getStackName();
|
||||
return BbPromise.reject(new this.serverless.classes.Error([
|
||||
`The serverless deployment bucket "${params.Bucket}" does not exist.`,
|
||||
`Create it manually if you want to reuse the CloudFormation stack "${stackName}",`,
|
||||
'or delete the stack then run "sls deploy".',
|
||||
].join(' ')));
|
||||
}).then((result) => {
|
||||
if (result && result.Contents && result.Contents.length) {
|
||||
const objects = result.Contents;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user