Skip to content

Commit

Permalink
clean up error logging (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Boyd authored and jpeeler committed Oct 20, 2017
1 parent dff470f commit 117bfbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions pkg/controller/controller_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1251,10 +1251,7 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro
// the instance.
errText := ""
if httpErr, ok := osb.IsHTTPError(err); ok {
errText = fmt.Sprintf(
"Status code: %d; ErrorMessage: %q; description: %q",
httpErr.StatusCode, httpErr.ErrorMessage, httpErr.Description,
)
errText = httpErr.Error()
} else {
errText = err.Error()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/controller_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ func TestPollServiceInstanceClusterServiceBrokerError(t *testing.T) {

events := getRecordedEvents(testController)
assertNumEvents(t, events, 1)
expectedEvent := corev1.EventTypeWarning + " " + errorPollingLastOperationReason + " " + "Error polling last operation: Status code: 403; ErrorMessage: %!q(*string=<nil>); description: %!q(*string=<nil>)"
expectedEvent := corev1.EventTypeWarning + " " + errorPollingLastOperationReason + " " + "Error polling last operation: Status: 403; ErrorMessage: <nil>; Description: <nil>; ResponseError: <nil>"
if e, a := expectedEvent, events[0]; e != a {
t.Fatalf("Received unexpected event: %v\nExpected: %v", a, e)
}
Expand Down

0 comments on commit 117bfbd

Please sign in to comment.