File tree Expand file tree Collapse file tree
packages/bucket-provisioner/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,6 +239,10 @@ export class BucketProvisioner {
239239
240240 /**
241241 * Configure S3 Block Public Access settings.
242+ *
243+ * Gracefully skips if the S3-compatible backend (e.g. MinIO) does not
244+ * support PutPublicAccessBlock — the operation is best-effort since
245+ * not all providers implement this AWS-specific API.
242246 */
243247 async setPublicAccessBlock (
244248 bucketName : string ,
@@ -252,6 +256,20 @@ export class BucketProvisioner {
252256 } ) ,
253257 ) ;
254258 } catch ( err : any ) {
259+ // Some S3-compatible backends (e.g. older MinIO) don't support
260+ // PutPublicAccessBlock. Treat XML parse errors or "not implemented"
261+ // responses as non-fatal — the bucket is still usable.
262+ if (
263+ err . Code === 'XmlParseException' ||
264+ err . name === 'XmlParseException' ||
265+ err . Code === 'NotImplemented' ||
266+ err . name === 'NotImplemented' ||
267+ err . message ?. includes ( 'not well-formed' ) ||
268+ err . message ?. includes ( 'not implemented' ) ||
269+ err . message ?. includes ( 'PublicAccessBlockConfiguration' )
270+ ) {
271+ return ;
272+ }
255273 throw new ProvisionerError (
256274 'POLICY_FAILED' ,
257275 `Failed to set public access block on '${ bucketName } ': ${ err . message } ` ,
You can’t perform that action at this time.
0 commit comments