Skip to content

Commit

Permalink
Fix error casting
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Dec 19, 2022
1 parent 36f33a6 commit 1e90473
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions network/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ func (s *Server) Run() error {
}

// Since gnet.Run is blocking, we need to run OnRun before it
onRunData := map[string]interface{}{
"address": addr,
"error": err,
onRunData := map[string]interface{}{"address": addr}
if err != nil && err.Unwrap() != nil {
onRunData["error"] = err.OriginalError.Error()
}
result, err := s.hooksConfig.Run(
context.Background(), onRunData, plugin.OnRun, s.hooksConfig.Verification)
Expand Down

0 comments on commit 1e90473

Please sign in to comment.