2026-03-18 17:07:55: merge [main:1bd032e5aa9a3d83735ea3fb30aeab719d917b82];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
c7bd042239
commit
f3fb9cff75
12 files changed
+133
-111
No files matched your search
@@ -18,6 +18,7 @@ type EntryPointConfig struct {
|
||||
|
||||
type EndpointResolver interface {
|
||||
ResolveEndpoint(method string, path string, cfg EntryPointConfig) (*domain.EndpointMeta, error)
|
||||
GetPaths(path string, cfg EntryPointConfig) (string, string)
|
||||
}
|
||||
|
||||
func Entrypoint(
|
||||
@@ -32,6 +33,17 @@ func Entrypoint(
|
||||
|
||||
endpoint, err := entryPointResolver.ResolveEndpoint(req.Method, req.URL.Path, cfg)
|
||||
if err != nil {
|
||||
lookupPath, endpoint := entryPointResolver.GetPaths(req.URL.Path, cfg)
|
||||
logger.Warn(
|
||||
req.Context(),
|
||||
"call unknown method",
|
||||
log.String("pathPrefix", cfg.PathPrefix),
|
||||
log.String("httpMethod", req.Method),
|
||||
log.String("originalPath", req.URL.Path),
|
||||
log.String("lookupPath", lookupPath),
|
||||
log.String("enpoint", endpoint),
|
||||
)
|
||||
|
||||
http.Error(writer, err.Error(), http.StatusNotImplemented)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user