{"record":{"id":"0423f1f0ec8c94ca","repo":"remotion-dev/remotion","slug":"privacy-must-be-either-private-or-public-or-n","errorCode":null,"errorMessage":"Privacy must be either \"private\" or \"public\" or \"no-acl\"","messagePattern":"Privacy must be either \"private\" or \"public\" or \"no-acl\"","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/cloudrun/src/shared/validate-privacy.ts","lineNumber":9,"sourceCode":"import type {Privacy} from './constants';\n\nexport function validatePrivacy(privacy: unknown): asserts privacy is Privacy {\n\tif (typeof privacy !== 'string') {\n\t\tthrow new TypeError('Privacy must be a string');\n\t}\n\n\tif (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {\n\t\tthrow new TypeError(\n\t\t\t'Privacy must be either \"private\" or \"public\" or \"no-acl\"',\n\t\t);\n\t}\n}\n","sourceCodeStart":1,"sourceCodeEnd":14,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/shared/validate-privacy.ts#L1-L14","documentation":"Thrown by validatePrivacy() when privacy is a string but not one of the three allowed values ('public', 'private', 'no-acl'). Ensures the ACL mode applied to GCS output objects is one Remotion knows how to set. The message lists all valid values.","triggerScenarios":"Passing a misspelled or unsupported privacy value such as 'Public', 'PUBLIC', 'protected', 'readonly', or 'authenticated'.","commonSituations":"Case mismatch ('Public' vs 'public'); migrating from another cloud provider's terminology; typo; using a Lambda-only privacy value not supported on Cloud Run.","solutions":["Use exactly 'public', 'private', or 'no-acl' (lowercase).","Normalize input with .toLowerCase() before passing if you accept user input.","Default to 'public' (the package DEFAULT_OUTPUT_PRIVACY) when in doubt."],"exampleFix":"// before\nawait renderMediaOnCloudRun({ privacy: 'Public', ... });\n// after\nawait renderMediaOnCloudRun({ privacy: 'public', ... });","handlingStrategy":"validation","validationCode":"import { validatePrivacy } from '@remotion/cloudrun/shared';\nvalidatePrivacy(privacy);","typeGuard":"type Privacy = 'public' | 'private' | 'no-acl';\nfunction isPrivacy(v: unknown): v is Privacy {\n  return v === 'public' || v === 'private' || v === 'no-acl';\n}","tryCatchPattern":"if (!isPrivacy(privacy)) throw new Error('privacy must be public | private | no-acl');","preventionTips":["Use lowercase privacy values exactly as defined in the Privacy type.","Normalize user input with .toLowerCase() before passing.","Default to 'public' when unsure."],"tags":["cloudrun","validation","privacy"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}