summaryrefslogtreecommitdiff
path: root/pkg/bindings/errors.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-04 10:58:59 -0800
committerGitHub <noreply@github.com>2020-02-04 10:58:59 -0800
commitbda30094013de14e72bb54e919992f2c8303c272 (patch)
treec33dc72af8e3daf377667fa04e1775218bf5d4f7 /pkg/bindings/errors.go
parentb702134edc823782e67fd3f06fdeaf3f63de2af3 (diff)
parent68287ff8bd5200edbb6b486c7293ba6d76ae41bd (diff)
downloadpodman-bda30094013de14e72bb54e919992f2c8303c272.tar.gz
podman-bda30094013de14e72bb54e919992f2c8303c272.tar.bz2
podman-bda30094013de14e72bb54e919992f2c8303c272.zip
Merge pull request #5033 from sujil02/new-test
Adding test to check Tag and list images endpoints in apis.
Diffstat (limited to 'pkg/bindings/errors.go')
-rw-r--r--pkg/bindings/errors.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go
index 8bd40f804..1bcaac3f0 100644
--- a/pkg/bindings/errors.go
+++ b/pkg/bindings/errors.go
@@ -3,7 +3,6 @@ package bindings
import (
"encoding/json"
"io/ioutil"
- "net/http"
"github.com/containers/libpod/pkg/api/handlers/utils"
"github.com/pkg/errors"
@@ -26,7 +25,7 @@ func (a APIResponse) Process(unmarshalInto interface{}) error {
if err != nil {
return errors.Wrap(err, "unable to process API response")
}
- if a.Response.StatusCode == http.StatusOK {
+ if a.IsSuccess() {
if unmarshalInto != nil {
return json.Unmarshal(data, unmarshalInto)
}