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

fix: Fix calls to stacktrace in the reverse proxy module #2100

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func CreateReverseProxy(
logrus.Debugf("Something failed while trying to create the reverse proxy object using container with ID '%s'. Error was:\n%s", proxyDockerContainer.GetId(), getProxyObjErr.Error())
logrus.Debugf("Destroying the failing reverse proxy to create a new one...")
if destroyProxyContainerErr := destroyReverseProxyWithContainerId(ctx, dockerManager, proxyDockerContainer.GetId()); destroyProxyContainerErr != nil {
return nil, nil, stacktrace.Propagate(err, "an error occurred destroying the current reverse proxy that was failing to create a new one")
return nil, nil, stacktrace.Propagate(destroyProxyContainerErr, "an error occurred destroying the current reverse proxy that was failing to create a new one")
}
logrus.Debugf("... current reverse proxy successfully destroyed, starting a new one now.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ConnectReverseProxyToNetwork(ctx context.Context, dockerManager *docker_man
}

if maybeReverseProxyObject == nil {
return stacktrace.Propagate(err, "An error occurred while connecting the reverse proxy to the enclave network '%v' because no reverse proxy was found", networkId)
return stacktrace.NewError("An error occurred while connecting the reverse proxy to the enclave network '%v' because no reverse proxy was found", networkId)
}

_, found := maybeReverseProxyObject.GetEnclaveNetworksIpAddress()[networkId]
Expand All @@ -48,7 +48,7 @@ func DisconnectReverseProxyFromNetwork(ctx context.Context, dockerManager *docke
}

if maybeReverseProxyObject == nil {
return stacktrace.Propagate(err, "An error occurred while disconnecting the reverse proxy from the enclave network '%v' because no reverse proxy was found", networkId)
return stacktrace.NewError("An error occurred while disconnecting the reverse proxy from the enclave network '%v' because no reverse proxy was found", networkId)
}

_, found := maybeReverseProxyObject.GetEnclaveNetworksIpAddress()[networkId]
Expand Down
Loading