diff --git a/server/runtime_javascript.go b/server/runtime_javascript.go index 7d691906a7..8b661b9f29 100644 --- a/server/runtime_javascript.go +++ b/server/runtime_javascript.go @@ -394,7 +394,7 @@ func (rp *RuntimeProviderJS) BeforeReq(ctx context.Context, id string, logger *z return nil, errors.New("Could not run runtime Before function."), codes.Internal } - jsLogger, err := NewJsLogger(r.vm, logger, zap.String("api_id", strings.TrimPrefix(id, API_PREFIX_LOWERCASE)), zap.String("mode", RuntimeExecutionModeAfter.String())) + jsLogger, err := NewJsLogger(r.vm, logger, zap.String("api_id", strings.TrimPrefix(id, API_PREFIX_LOWERCASE)), zap.String("mode", RuntimeExecutionModeBefore.String())) if err != nil { rp.Put(r) logger.Error("Could not instantiate js logger.", zap.Error(err))