Skip to content

Commit

Permalink
net/ghttp: update error message for duplicated routes registering (#3603
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hailaz authored Jun 13, 2024
1 parent 88f188d commit fba878f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/ghttp/ghttp_server_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ func (s *Server) doSetHandler(
if duplicatedHandler != nil {
s.Logger().Fatalf(
ctx,
`duplicated route registry "%s" at %s , already registered at %s`,
pattern, handler.Source, duplicatedHandler.Source,
"The duplicated route registry [%s] which is meaning [{hook}%%{method}:{path}@{domain}] at \n%s -> %s , which has already been registered at \n%s -> %s"+
"\nYou can disable duplicate route detection by modifying the server.routeOverWrite configuration, but this will cause some routes to be overwritten",
routerKey, handler.Source, handler.Name, duplicatedHandler.Source, duplicatedHandler.Name,
)
}
}
Expand Down

0 comments on commit fba878f

Please sign in to comment.