{"record":{"id":"b0becfe0d05a0f9c","repo":"moodle/moodle","slug":"you-must-provide-a-value-for-key-in-your-config-for-the","errorCode":null,"errorMessage":"You must provide a value for \"{$key}\" in your config for the MultipartUploader for {serviceFullName}.","messagePattern":"You must provide a value for \"(.+?)\" in your config for the MultipartUploader for (.+?)\\.","errorType":"validation","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"public/lib/aws-sdk/src/Multipart/AbstractUploadManager.php","lineNumber":244,"sourceCode":"\n    /**\n     * Based on the config and service-specific workflow info, creates a\n     * `Promise` for an `UploadState` object.\n     */\n    private function determineState(): UploadState\n    {\n        // If the state was provided via config, then just use it.\n        if ($this->config['state'] instanceof UploadState) {\n            return $this->config['state'];\n        }\n\n        // Otherwise, construct a new state from the provided identifiers.\n        $required = $this->info['id'];\n        $id = [$required['upload_id'] => null];\n        unset($required['upload_id']);\n        foreach ($required as $key => $param) {\n            if (!$this->config[$key]) {\n                throw new IAE('You must provide a value for \"' . $key . '\" in '\n                    . 'your config for the MultipartUploader for '\n                    . $this->client->getApi()->getServiceFullName() . '.');\n            }\n            $id[$param] = $this->config[$key];\n        }\n        $state = new UploadState($id, $this->config);\n        $state->setPartSize($this->determinePartSize());\n\n        return $state;\n    }\n\n    /**\n     * Executes a MUP command with all of the parameters for the operation.\n     *\n     * @param string $operation Name of the operation.\n     * @param array  $params    Service-specific params for the operation.\n     *\n     * @return PromiseInterface","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/moodle/moodle/blob/48ea8c33227277e916cdd4079dbecef448b37f2c/public/lib/aws-sdk/src/Multipart/AbstractUploadManager.php#L226-L262","documentation":"Guard in AbstractUploadManager::determineState (invoked from the uploader's constructor). When no UploadState was supplied via the 'state' config option, the manager reconstructs the upload state from the service's required identifier parameters (e.g. 'bucket' and 'key' for S3, plus upload_id when resuming). If any required identifier key is missing or falsy in the config, this InvalidArgumentException is thrown, because the multipart state cannot identify the upload target without it.","triggerScenarios":"Thrown at public/lib/aws-sdk/src/Multipart/AbstractUploadManager.php:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass every identifier the service's multipart upload requires in the uploader config, e.g. 'bucket' and 'key' for S3: new MultipartUploader($client, $source, ['bucket' => $b, 'key' => $k])","If resuming, pass a previously serialized UploadState via the 'state' config option instead of re-supplying identifiers","Before constructing the uploader, validate that the config array contains all keys listed in the service's id definition ('before_upload' ids minus upload_id)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"48ea8c33227277e916cdd4079dbecef448b37f2c","analyzedAt":"2026-09-14T20:34:48.527Z","contentChangedAt":"2026-09-14T20:34:48.527Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}