feat(server): handle panic in runtime

ref #2
This commit is contained in:
2023-03-01 13:04:40 +01:00
parent fefcba5901
commit 8789b85d92
8 changed files with 41 additions and 15 deletions

View File

@ -65,7 +65,7 @@ func TestAuthModule(t *testing.T) {
ctx := context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req)
if _, err := server.ExecFuncByName("testAuth", ctx); err != nil {
if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
}
@ -104,7 +104,7 @@ func TestAuthAnonymousModule(t *testing.T) {
ctx := context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req)
if _, err := server.ExecFuncByName("testAuth", ctx); err != nil {
if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
}