mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
refactor(server): use httperror.NewError instead of struct [EE-6189] (#10398)
This commit is contained in:
parent
da346cba60
commit
95f3cf6e5b
26 changed files with 39 additions and 35 deletions
|
@ -46,7 +46,7 @@ type Handler struct {
|
|||
func stackExistsError(name string) *httperror.HandlerError {
|
||||
msg := fmt.Sprintf("A stack with the normalized name '%s' already exists", name)
|
||||
err := errors.New(msg)
|
||||
return &httperror.HandlerError{StatusCode: http.StatusConflict, Message: msg, Err: err}
|
||||
return httperror.Conflict(msg, err)
|
||||
}
|
||||
|
||||
// NewHandler creates a handler to manage stack operations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue