You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve R2 error messages to be clearer and more actionable
6
+
7
+
Error messages for `r2 bucket lifecycle`, `r2 bucket lock`, `r2 bucket catalog`, and `r2 sql` commands now include the specific flag or argument that is missing or invalid, along with usage examples showing the correct syntax.
`Both namespace and table must be provided together. You specified namespace without table. Retry by running:\n wrangler r2 bucket catalog ${subcommand}${bucket} <namespace> <table>`,
`Both namespace and table must be provided together. You specified table without namespace. Retry by running:\n wrangler r2 bucket catalog ${subcommand}${bucket} <namespace> <table>`,
"No lifecycle action specified. Use at least one of --expire-days, --expire-date, --ia-transition-days, --ia-transition-date, or --abort-multipart-days.",
`The number of days ${conditionValueFrom==="args" ? "passed to --abort-multipart-days" : "for aborting incomplete multipart uploads"} must be a positive number (e.g. 7), but received '${String(conditionValue)}'.`,
"Must be a positive number or a valid date in the YYYY-MM-DD format.",
280
+
`Invalid value '${String(conditionValue)}' for ${action==="expire" ? "expiration" : "transition"} condition. Provide a positive number of days or a date in YYYY-MM-DD format (e.g. 30 or 2025-12-31).`,
`Invalid value '${String(conditionValue)}' for ${action==="expire" ? "expiration" : "transition"} condition. Expected a positive number of days or a date in YYYY-MM-DD format (e.g. --expire-days 30 or --expire-date 2025-12-31).`,
`Invalid warehouse name format '${warehouse}'. Expected the format '<account-id>_<bucket-name>' (e.g. 'abc123_my-bucket'). You can find the warehouse name by running: wrangler r2 bucket catalog get <bucket>`,
0 commit comments