Skip to content

Standardize on obstore's NotFoundError - #199

Closed
kylebarron wants to merge 3 commits into
mainfrom
kyle/not-found-error
Closed

kylebarron wants to merge 3 commits into
mainfrom
kyle/not-found-error

Conversation

@kylebarron

@kylebarron kylebarron commented Feb 3, 2025 •

Copy link
Copy Markdown
Member

Closes #197

@kylebarron
kylebarron enabled auto-merge (squash) February 3, 2025 16:07
@ion-elgreco

Copy link
Copy Markdown

Also fine with keeping the Py FileNotFoundError, I think in delta-rs we also raise that one instead of a custom exception

@kylebarron

Copy link
Copy Markdown
Member Author

Also fine with keeping the Py FileNotFoundError, I think in delta-rs we also raise that one instead of a custom exception

I'm debating this too... I'm leaning towards using the obstore.exceptions.NotFoundError so that it can subclass from a common base exception from obstore.exceptions?

@ion-elgreco

Copy link
Copy Markdown

Also fine with keeping the Py FileNotFoundError, I think in delta-rs we also raise that one instead of a custom exception

I'm debating this too... I'm leaning towards using the obstore.exceptions.NotFoundError so that it can subclass from a common base exception from obstore.exceptions?

That might be better if you want to handle exceptions across obstore with the base exception.

@kylebarron

Copy link
Copy Markdown
Member Author

@martindurant How can we tell fsspec a list of allowed exceptions? Switching from FileNotFoundError to obstore.exceptions.NotFoundError is breaking the fsspec integration

@martindurant

Copy link
Copy Markdown
Contributor

Simplest would be to subclass

@kylebarron

kylebarron commented Mar 4, 2025 •

Copy link
Copy Markdown
Member Author

I think one possible solution here (without having to subclass fsspec) is to make NotFoundError subclass from both BaseError and FileNotFoundError. However, it's unclear if multiple inheritance is possible in pyo3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NotFoundError is not raised, but Python FileNotFoundError is raised

3 participants