From d14f5dfa433648e7d53817cdb87d82efd1939365 Mon Sep 17 00:00:00 2001 From: Derek Horton Date: Tue, 24 Sep 2024 16:03:19 -0500 Subject: [PATCH] Added a debug log message when request is denied --- internal/api/controllers/private/runsCreate.go | 1 + internal/api/controllers/private/runsCreateV2.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/api/controllers/private/runsCreate.go b/internal/api/controllers/private/runsCreate.go index dbdc853c..fc4352f2 100644 --- a/internal/api/controllers/private/runsCreate.go +++ b/internal/api/controllers/private/runsCreate.go @@ -33,6 +33,7 @@ func (this *controllers) ApiInternalRunsCreate(ctx echo.Context) error { } if utils.IsOrgIdBlocklisted(this.config, orgIdString) { + utils.GetLogFromEcho(ctx).Debugw("Rejecting request because the org_id is blocklisted") return handleRunCreateError(&utils.BlocklistedOrgIdError{OrgID: orgIdString}) } diff --git a/internal/api/controllers/private/runsCreateV2.go b/internal/api/controllers/private/runsCreateV2.go index 9bea5e6a..40a7f284 100644 --- a/internal/api/controllers/private/runsCreateV2.go +++ b/internal/api/controllers/private/runsCreateV2.go @@ -34,6 +34,7 @@ func (this *controllers) ApiInternalV2RunsCreate(ctx echo.Context) error { context = utils.WithRequestType(context, getRequestTypeLabel(runInputV2)) if utils.IsOrgIdBlocklisted(this.config, string(runInputV2.OrgId)) { + utils.GetLogFromEcho(ctx).Debugw("Rejecting request because the org_id is blocklisted") return handleRunCreateError(&utils.BlocklistedOrgIdError{OrgID: string(runInputV2.OrgId)}) }