mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Return more context on awslogs create failure
Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
This commit is contained in:
parent
deac65c929
commit
7a5c813d9c
1 changed files with 7 additions and 3 deletions
|
@ -375,13 +375,17 @@ func (l *logStream) create() error {
|
|||
if l.logCreateGroup {
|
||||
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == resourceNotFoundCode {
|
||||
if err := l.createLogGroup(); err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "failed to create Cloudwatch log group")
|
||||
}
|
||||
return l.createLogStream()
|
||||
err := l.createLogStream()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create Cloudwatch log stream")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "failed to create Cloudwatch log stream")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue