{"record":{"id":"63f27243658f5ecf","repo":"floci-io/floci","slug":"override-s-must-not-be-blank","errorCode":null,"errorMessage":"Override %s must not be blank.","messagePattern":"Override (.+?) must not be blank\\.","errorType":"http","errorClass":"AwsException","httpStatus":400,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/core/common/ReservedTags.java","lineNumber":169,"sourceCode":"            throw new AwsException(errorCode, \"Override %s contains unsupported characters.\".formatted(name), 400);\n        }\n        if (normalized.chars().anyMatch(Character::isISOControl)) {\n            throw new AwsException(errorCode, CONTROL_CHARACTER_ERROR_MESSAGE.formatted(name), 400);\n        }\n        return normalized;\n    }\n\n    private static String validateClientSecret(String overrideSecret, String name, String errorCode) {\n        String normalized = checkNullAndWhitespace(overrideSecret, name, errorCode);\n        if (normalized.chars().anyMatch(Character::isISOControl)) {\n            throw new AwsException(errorCode, CONTROL_CHARACTER_ERROR_MESSAGE.formatted(name), 400);\n        }\n        return normalized;\n    }\n\n    private static String checkNullAndWhitespace(String overrideSecret, String name, String errorCode) {\n        if (overrideSecret == null || overrideSecret.trim().isEmpty()) {\n            throw new AwsException(errorCode, \"Override %s must not be blank.\".formatted(name), 400);\n        }\n        String normalized = overrideSecret.trim();\n        if (normalized.chars().anyMatch(Character::isWhitespace)) {\n            throw new AwsException(errorCode, \"Override %s must not contain whitespace.\".formatted(name), 400);\n        }\n        return normalized;\n    }\n\n\n    private static boolean isReserved(String key) {\n        return key != null && key.startsWith(RESERVED_PREFIX);\n    }\n}\n","sourceCodeStart":151,"sourceCodeEnd":183,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/core/common/ReservedTags.java#L151-L183","documentation":"Thrown by the Lambda invoke action when the invocation returns a FunctionError (Handled/Unhandled) or an HTTP status of 400+. The emulator builds a CodePipeline.job event, invokes the configured function synchronously (RequestResponse), and any function-side failure fails the pipeline action with ActionExecutionFailed. The message contains the function error string.","triggerScenarios":"Lambda function raising an exception before calling PutJobSuccessResult; function returning a non-2xx via the emulator's invoke layer; function timeout or resource error surfaced as FunctionError; wrong FunctionName in the action configuration.","commonSituations":"Job worker functions that forget to catch their own errors; functions that assume a real AWS environment (role, env vars) absent in the emulator; artifact processing code failing on unexpected input.","solutions":["Invoke the function directly (aws lambda invoke) with the same CodePipeline.job event shape and read the error/stack trace","Wrap the function body in try-catch, report PutJobFailureResult with failureDetails, and still exit cleanly so the pipeline records a controlled failure","Verify configuration.FunctionName matches an existing function in the same emulator region/account"],"exampleFix":"// before (lambda handler)\nexports.handler = async (job) => { deployArtifact(job); /* throws -> unhandled */ };\n\n// after\nexports.handler = async (job) => {\n  try { deployArtifact(job); } catch (e) {\n    await cp.putJobFailureResult({ jobId: job.id, failureDetails: { type: 'JobFailed', message: e.message } }).promise();\n  }\n};","handlingStrategy":"retry","validationCode":"if (action.configuration().get(\"FunctionName\") == null\n        || lambda.getFunction(r -> r.functionName(cfg.get(\"FunctionName\")).build()) == null) {\n    throw new IllegalStateException(\"Lambda action target does not exist\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    lambda.invoke(r -> r.functionName(fn).payload(codec.toJson(jobEvent)));\n} catch (AwsServiceException fnErr) {\n    // transient invoke failures: retry with backoff before failing the pipeline action\n}","preventionTips":["Make worker functions catch their own exceptions and report PutJobFailureResult deliberately","Smoke-test the function with a synthetic CodePipeline.job event before attaching it to a pipeline"],"tags":["codepipeline","lambda","action-failed","invoke"],"backgroundTag":null,"analyzedSha":"62ff490619e7bd3554597c28c704081b4c15add5","analyzedAt":"2026-08-14T14:25:23.764Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}