mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
refactor(edgestacks): move handlerDBErr() out of the handler BE-11572 (#336)
This commit is contained in:
parent
9044b25a23
commit
701ff5d6bc
6 changed files with 8 additions and 8 deletions
|
@ -58,10 +58,10 @@ func NewHandler(bouncer security.BouncerService, dataStore dataservices.DataStor
|
|||
return h
|
||||
}
|
||||
|
||||
func (handler *Handler) handlerDBErr(err error, msg string) *httperror.HandlerError {
|
||||
func handlerDBErr(err error, msg string) *httperror.HandlerError {
|
||||
httpErr := httperror.InternalServerError(msg, err)
|
||||
|
||||
if handler.DataStore.IsErrObjectNotFound(err) {
|
||||
if dataservices.IsErrObjectNotFound(err) {
|
||||
httpErr.StatusCode = http.StatusNotFound
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue