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

Wrong HTTP code received upon secret deletion where secret not found #347

Closed
alexellis opened this Issue Jan 10, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@alexellis
Copy link
Member

alexellis commented Jan 10, 2019

Expected/Current Behaviour

I expected to get a 404, but got a 500

2019/01/10 11:42:25 Secret test delete error: secrets "test" not found

Possible Solution

Handle error in the faas-netes code and update unit test

Steps to Reproduce (for bugs)

Checkout openfaas/faas-cli

go build && ./faas-cli secret remove a
WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates.
Unable to find secret: a

Check the logs:

kubectl logs deploy/gateway -n openfaas -c faas-netes

Context

Needs fixing before we release, document and announce the feature.

This may also affect openfaas-incubator/openfaas-operator

Your Environment

kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:55:54Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-11-08T00:23:22Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}

faas-cli - master.

LucasRoesler added a commit to LucasRoesler/faas-netes that referenced this issue Jan 10, 2019

Add error checking in delete and update for non-existing secrets
**What**
- Return 404 if the secret does not exist during an update or delete

Resolves openfaas#347

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>

LucasRoesler added a commit to LucasRoesler/faas-netes that referenced this issue Jan 13, 2019

Add error checking in delete and update for non-existing secrets
**What**
- Return 404 if the secret does not exist during an update or delete

Resolves openfaas#347

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>

alexellis added a commit that referenced this issue Jan 13, 2019

Add error checking in delete and update for non-existing secrets
**What**
- Return 404 if the secret does not exist during an update or delete

Resolves #347

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment