Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
4f59d229
Commit
4f59d229
authored
Jan 19, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: cloudwatch corrected error handling so original error is not thrown away
parent
4720b86f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
pkg/tsdb/cloudwatch/metric_find_query.go
+4
-3
No files found.
pkg/tsdb/cloudwatch/metric_find_query.go
View file @
4f59d229
...
...
@@ -3,6 +3,7 @@ package cloudwatch
import
(
"context"
"errors"
"fmt"
"reflect"
"sort"
"strings"
...
...
@@ -191,11 +192,11 @@ func (e *CloudWatchExecutor) executeMetricFindQuery(ctx context.Context, queryCo
dsInfo
:=
e
.
getDsInfo
(
region
)
cfg
,
err
:=
e
.
getAwsConfig
(
dsInfo
)
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"Failed to call ec2:DescribeInstances"
)
return
nil
,
fmt
.
Errorf
(
"Failed to call ec2:DescribeInstances, %v"
,
err
)
}
sess
,
err
:=
session
.
NewSession
(
cfg
)
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"Failed to call ec2:DescribeInstances"
)
return
nil
,
fmt
.
Errorf
(
"Failed to call ec2:DescribeInstances, %v"
,
err
)
}
e
.
ec2Svc
=
ec2
.
New
(
sess
,
cfg
)
...
...
@@ -478,7 +479,7 @@ func (e *CloudWatchExecutor) cloudwatchListMetrics(region string, namespace stri
return
!
lastPage
})
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"Failed to call cloudwatch:ListMetrics"
)
return
nil
,
fmt
.
Errorf
(
"Failed to call cloudwatch:ListMetrics, %v"
,
err
)
}
return
&
resp
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment