mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edgestack): incorrect response code (#8873)
This commit is contained in:
parent
19eceaf37f
commit
ed279ba65b
4 changed files with 46 additions and 28 deletions
|
@ -80,6 +80,9 @@ func (service *Service) PersistEdgeStack(
|
|||
|
||||
relatedEndpointIds, err := edge.EdgeStackRelatedEndpoints(stack.EdgeGroups, relationConfig.Endpoints, relationConfig.EndpointGroups, relationConfig.EdgeGroups)
|
||||
if err != nil {
|
||||
if err == edge.ErrEdgeGroupNotFound {
|
||||
return nil, NewInvalidPayloadError(err.Error())
|
||||
}
|
||||
return nil, fmt.Errorf("unable to persist environment relation in database: %w", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue