1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-09-16 17:46:19 +02:00

added more user friendly error message in case ServeEvent.Next() is not invoked

This commit is contained in:
Gani Georgiev
2024-11-01 19:10:33 +02:00
parent 1a1e3a2741
commit d3ca24e509

View File

@@ -236,6 +236,10 @@ func Serve(app core.App, config ServeConfig) error {
return serveHookErr
}
if listener == nil {
return errors.New("The OnServe finalizer wasn't invoked. Did you forget to call the ServeEvent.Next() method?")
}
if config.ShowStartBanner {
schema := "http"
addr := server.Addr