FlowiseAI/Flowise · error · Error
Failed to load S3 document: ${error.message}
Error message
Failed to load S3 document: ${error.message} What it means
Top-level catch-all for S3File.init wrapping any error during the single-file S3 load (download, unstructured parse, splitting, metadata). Interpolates the inner error message and loses the original stack (no cause chaining).
Source
Thrown at packages/components/nodes/documentloaders/S3File/S3File.ts:703
omitMetadataKeys
)
}))
} else {
docs = docs.map((doc) => ({
...doc,
metadata:
_omitMetadataKeys === '*'
? {}
: omit(
{
...doc.metadata
},
omitMetadataKeys
)
}))
}
} catch (error) {
throw new Error(`Failed to load S3 document: ${error.message}`)
}
if (output === 'document') {
return docs
} else {
let finaltext = ''
for (const doc of docs) {
finaltext += `${doc.pageContent}\n`
}
return handleEscapeCharacters(finaltext, false)
}
}
private async processWithUnstructured(
nodeData: INodeData,
options: ICommonObject,
bucketName: string,
keyName: string,View on GitHub (pinned to abe4a8601a)
Solutions
- Read the inner message to identify the failing stage.
- Verify the key exists and IAM has s3:GetObject.
- Confirm the Unstructured API URL and key are valid if using unstructured parsing.
- Validate metadata/omitMetadataKeys inputs.
- Re-throw with { cause: error }.
Example fix
// before
} catch (error) {
throw new Error(`Failed to load S3 document: ${error.message}`)
}
// after
} catch (error) {
throw new Error(`Failed to load S3 document: ${error instanceof Error ? error.message : String(error)}`, { cause: error })
} Defensive patterns
Strategy: try-catch
Validate before calling
async function verifyS3ObjectExists(s3Client, bucket, key) {
await s3Client.send(new (require('@aws-sdk/client-s3').HeadObjectCommand)({ Bucket: bucket, Key: key }))
} Try / catch
try {
return await s3FileLoader.init(nodeData, _, options)
} catch (e) {
throw new Error('S3 file load failed in pipeline', { cause: e })
} Prevention
- Confirm the key exists with a HeadObject pre-check.
- Verify IAM s3:GetObject and bucket region.
- Validate the Unstructured API URL/key if used.
- Validate metadata/omitMetadataKeys inputs.
When it happens
Trigger: Download of the key fails (propagated from [179]); the Unstructured loader API call fails; the document loader for the file type rejects; textSplitter rejects; metadata/omitMetadataKeys processing throws.
Common situations: Wrong key name; IAM missing s3:GetObject; Unstructured API URL/key misconfigured; corrupt/unsupported file; bad metadata JSON.
Related errors
- Failed to load data from bucket ${bucketName}: ${e.message}
- Failed to load Google Sheets data: ${error.message}
- Failed to download file ${key} from S3 bucket ${bucketName}:
- Failed to download file ${keyName} from S3 bucket ${bucketNa
- Failed to load file ${filePath} using unstructured loader.
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/bcf7c71ff0fba804.
Report an issue: GitHub.