storage_test_failed
HTTP 422 · code: "storage_test_failed" · type: https://docs.formfeed.dev/errors/storage-test-failed
Before a storage connection is saved, and whenever it is tested again, Formfeed writes a small test object, <prefix>.formfeed/connection-test.txt, to the bucket. That write failed. error carries the provider's answer, reduced to its code, its http_status and the first line of its message; key is the object Formfeed tried to write.
When a connection was being saved, nothing was stored: a new connection was not created, and an existing one stays as it was. When a stored connection was tested again, the problem also carries the connection; a paused connection stays paused.
Example
{
"type": "https://docs.formfeed.dev/errors/storage-test-failed",
"title": "Storage test failed",
"status": 422,
"detail": "Writing the test object failed: AccessDenied (Access Denied)",
"code": "storage_test_failed",
"error": {
"code": "AccessDenied",
"http_status": 403,
"message": "Access Denied"
},
"key": "formfeed/.formfeed/connection-test.txt",
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}
Common causes
error.code | Usually means |
|---|---|
AccessDenied | The key may not write to this bucket and prefix. On AWS, the policy must allow s3:PutObject on arn:aws:s3:::<bucket>/<prefix>*, plus kms:GenerateDataKey on the KMS key if the bucket encrypts with one. On Google Cloud Storage, a key that may not replace objects fails from the second test on |
InvalidAccessKeyId | The access key ID is mistyped, deleted, or belongs to another account or provider |
SignatureDoesNotMatch | The secret does not belong to the access key ID, or an S3-compatible service expects another signing region |
NoSuchBucket | The bucket name is wrong, or the bucket is in another account, or in the other R2 jurisdiction |
PermanentRedirect, AuthorizationHeaderMalformed | The region does not match the bucket's region |
EndpointBlocked | The endpoint is not https, carries credentials, or resolves to a private or internal address |
TimeoutError, NetworkError | The endpoint did not answer or does not exist; check the address |
CredentialsUnavailable | The stored credentials are gone, for example because the workspace was deleted |
How to fix it
- Compare the key's permissions with the minimal permissions for your provider.
- Check the bucket name, the region or R2 jurisdiction, and for S3-compatible services the endpoint and path-style addressing. See Connect a bucket.
- Save again with the corrected values. A paused connection resumes as soon as a test passes.
Retry?
After fixing the key or the bucket. Repeating the same request gives the same answer, unless the provider was only briefly unreachable.