fsspec / fsspec/gcsfs

Exceptions don't have a common superclass

Open
#236 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
398
Forks
181
Avg merge
2d 10h
Merged PRs (30d)
36

Description

I have code that uses gcsfs peppered in with other work. I'd like to catch gcsfs-related errors and treat them separately, but validate_response uses many different exception types from multiple libraries: FileNotFoundError, IOError, requests.exceptions.ProxyError, gcsfs.utils.HttpError, ValueError, and RuntimeError.

Would it be possible to make these all inherit from one common superclass, as the standard library urllib module does?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at validate_response in gcsfs/core.py and inspect gcsfs.utils.HttpError alongside the listed exception sources. Trace how these errors are exposed to callers and review the surrounding error-handling behavior before defining the scope. Done means callers can catch the listed gcsfs-related errors through one common superclass.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.