mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #37944 from IRCody/awslogs_error_context
Return more context on awslogs create failure
This commit is contained in:
commit
b48bf39a79
1 changed files with 7 additions and 3 deletions
|
@ -380,13 +380,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