Skip to content

More user-friendly path errorsΒ #9

@angrynode

Description

@angrynode

Path extensions error are not really user-friendly because they don't indicate which path failed, only the extension (if we're lucky that an extension can be parsed from the file). We should probably indicate the complete path failing so that the user can take action instead of lamenting on the meaninglessness of life :)

Error variants which should have the path:

  • UnknownFileExtension
  • InvalidFileExtension
  • CannotCanonicalizeDirectory/File/IgnorePath/CacheBustedDir
  • FilePathIsNotUtf8
  • InvalidUnicodeInDirectoryName/EntryName
  • Gzip/Zstd
  • CannotGetMetadata

Apparently GlobError already has the path and an inner std::io::Error so we could use that instead of adding a variant. But it's actually semantically reading either file metadata or folder entries.

It may be clearer to have:

  • the path
  • the inner std::io::Error
  • an optional operation context (cache bust, ignore paths)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions