Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API returns 500 in case network is not found instead of 404 #7188

Merged

Conversation

zhangguanzhang
Copy link
Collaborator

Signed-off-by: zhangguanzhang [email protected]
Fixes: #7184

@zhangguanzhang zhangguanzhang force-pushed the network-404 branch 2 times, most recently from c87ad9a to 902184b Compare August 2, 2020 13:41
@@ -2,6 +2,7 @@ package compat

import (
"encoding/json"
"github.com/containers/podman/v2/libpod/define"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should go in the batch that starts on line 13

@@ -2,13 +2,13 @@ package libpod

import (
"encoding/json"
"github.com/containers/podman/v2/libpod/define"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should go in the batch that starts on line 8

@@ -3,6 +3,7 @@ package network
import (
"encoding/json"
"fmt"
"github.com/containers/podman/v2/libpod/define"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should go in the batch that starts on line 13

@@ -2,6 +2,7 @@ package network

import (
"encoding/json"
"github.com/containers/podman/v2/libpod/define"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should go in the batch that starts on line 11


t GET /networks/non-existing-network 404

# vim: filetype=sh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline at end of file

@zhangguanzhang
Copy link
Collaborator Author

@orenbm thanks

@zhangguanzhang
Copy link
Collaborator Author

@vrothberg PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@baude @mheon PTAL

@mheon
Copy link
Member

mheon commented Aug 3, 2020

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon, zhangguanzhang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2020
@openshift-merge-robot openshift-merge-robot merged commit 96ece0c into containers:master Aug 3, 2020
@@ -20,10 +19,6 @@ const (
DefaultPodmanDomainName = "dns.podman"
)

var (
ErrNetworkNotFound = errors.New("network not found")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been left and just a redirect to define.ErrNetowrkNotFound, otherwise you are changing the API.

@zhangguanzhang zhangguanzhang deleted the network-404 branch August 8, 2020 10:40
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman API returns 500 in case network is not found instead of 404
7 participants