Skip to content

Commit

Permalink
add error consistency in link node status resp (#19279)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso authored Feb 22, 2023
1 parent 7193916 commit 036a122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vault/hcp_link/capabilities/node_status/node_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package node_status

import (
"context"
"fmt"

"github.com/hashicorp/hcp-link/pkg/nodestatus"
"github.com/hashicorp/vault/helper/logging"
"github.com/hashicorp/vault/vault"
"github.com/hashicorp/vault/vault/hcp_link/internal"
"github.com/hashicorp/vault/vault/hcp_link/proto/node_status"
"github.com/shirou/gopsutil/v3/host"
Expand All @@ -24,7 +24,7 @@ type NodeStatusReporter struct {
func (c *NodeStatusReporter) GetNodeStatus(ctx context.Context) (retStatus nodestatus.NodeStatus, retErr error) {
defer func() {
if r := recover(); r != nil {
retErr = fmt.Errorf("internal server error")
retErr = vault.ErrInternalError
}
}()

Expand Down

0 comments on commit 036a122

Please sign in to comment.