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

helpful output for create frontend name collision #168

Closed
qrkourier opened this issue Jan 19, 2023 · 0 comments
Closed

helpful output for create frontend name collision #168

qrkourier opened this issue Jan 19, 2023 · 0 comments
Assignees
Labels
enhancement Enhancement of an existing feature
Milestone

Comments

@qrkourier
Copy link
Member

The controller API at POST /frontend responds with a server error (500) if the requested frontend name already exists, and the CLI panics.

panic: [POST /frontend][500] createFrontendInternalServerError 

goroutine 1 [running]:
main.(*adminCreateFrontendCommand).run(0x0?, 0x0?, {0xc00036f8c0?, 0x0?, 0x0?})
        /home/runner/work/zrok/zrok/cmd/zrok/adminCreateFrontend.go:55 +0x226
github.com/spf13/cobra.(*Command).execute(0xc00036a500, {0xc00036f890, 0x3, 0x3})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0x2b21aa0)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
main.main()
        /home/runner/work/zrok/zrok/cmd/zrok/main.go:85 +0x25

The response should be a bad request (400). Ideally, the response body should include a message that admin create frontend can parse to provide helpful output to the CLI user.

@qrkourier qrkourier added the enhancement Enhancement of an existing feature label Jan 19, 2023
@michaelquigley michaelquigley added this to the v0.3 milestone Jan 31, 2023
@michaelquigley michaelquigley self-assigned this Jan 31, 2023
@michaelquigley michaelquigley moved this from Backlog to Development in zrok Development Roadmap Jan 31, 2023
@michaelquigley michaelquigley moved this from Development to Backlog in zrok Development Roadmap Jan 31, 2023
@camotts camotts moved this from Backlog to Development in zrok Development Roadmap Jan 31, 2023
@camotts camotts moved this from Development to Evaluating in zrok Development Roadmap Feb 1, 2023
michaelquigley added a commit that referenced this issue Feb 2, 2023
Added error checking for duplicate frontend names (#168)
@github-project-automation github-project-automation bot moved this from Evaluating to Done in zrok Development Roadmap Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of an existing feature
Projects
Development

No branches or pull requests

3 participants