From aaddb62fa4d1041764a337f5b924f91d6fe0d925 Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Tue, 7 Sep 2021 18:38:29 -0700 Subject: [PATCH] remove the useless error message in logs --- src/injection/Injector.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/injection/Injector.ts b/src/injection/Injector.ts index 4abaa25..0c1c84a 100644 --- a/src/injection/Injector.ts +++ b/src/injection/Injector.ts @@ -101,6 +101,12 @@ export function injectUserForBuildTrigger() { const namespace = locals.namespace const appName = req.params.appName as string + if (!!req.header(CaptainConstants.headerAuth)) { + // Auth header is present, skip user injection for app token + next() + return + } + if (!token || !namespace || !appName) { Logger.e( 'Trigger app build is called with no token/namespace/appName'