Only return 200 if there are actually warnings in AWS roles create/update (#5487)

This commit is contained in:
Jeff Mitchell 2018-10-09 16:52:47 -04:00 committed by GitHub
parent b47e648ddf
commit c8dbab9c3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,6 +248,10 @@ func (b *backend) pathRolesWrite(ctx context.Context, req *logical.Request, d *f
return nil, err
}
if len(resp.Warnings) == 0 {
return nil, nil
}
return &resp, nil
}