Problem description
Your request failed because the x-oss-server-side-encryption-context header contains an invalid encryption context.
Causes
The value of x-oss-server-side-encryption-context must be a valid JSON string. OSS rejects the request if the value is not a valid JSON string.
Valid format:
{"key": "value"}Invalid format:
test encryption context parameterFor the full requirements for the encryption context, see EncryptionContext.
Examples
When test encryption context parameter is passed as the value of the x-oss-server-side-encryption-context header, OSS denies the request because the value is a plain string, not a valid JSON string.
Solutions
Check the value you passed in
x-oss-server-side-encryption-context.Replace it with a valid JSON string. For example:
{"purpose": "data-protection"}Resubmit the request.
If the request still fails, see EncryptionContext for all parameter constraints.