Strip fx call-chain noise from startup errors; clarify file:// error

This commit is contained in:
2026-06-17 03:58:50 +02:00
parent 6e6e107243
commit 8de8f8e5cc
3 changed files with 60 additions and 3 deletions

View File

@@ -23,9 +23,8 @@ type FileStorer struct {
// Uses the real OS filesystem by default; call SetFilesystem to override for testing.
func NewFileStorer(basePath string) (*FileStorer, error) {
fs := afero.NewOsFs()
// Ensure base path exists
if err := fs.MkdirAll(basePath, 0755); err != nil {
return nil, fmt.Errorf("creating base path: %w", err)
return nil, fmt.Errorf("file:// storage: cannot create or access %s: %w (check that the volume is mounted and writable)", basePath, err)
}
return &FileStorer{
fs: fs,