Skip to content

fix: clear errors for missing embeddings and S3 403 (#114)#159

Open
mithil27360 wants to merge 1 commit intoreactome:mainfrom
mithil27360:fix/embeddings-error-handling
Open

fix: clear errors for missing embeddings and S3 403 (#114)#159
mithil27360 wants to merge 1 commit intoreactome:mainfrom
mithil27360:fix/embeddings-error-handling

Conversation

@mithil27360
Copy link
Copy Markdown

  • Add EmbeddingEnvironment.get_dir_or_raise() to raise RuntimeError with install instructions instead of returning None
  • Update retriever call sites to use get_dir_or_raise()
  • Catch botocore ClientError in pull() and ls_remote() with human-readable messages for 403 and NoSuchKey errors

Fixes #114

- Add EmbeddingEnvironment.get_dir_or_raise() to raise RuntimeError
  with install instructions instead of returning None
- Update retriever call sites to use get_dir_or_raise()
- Catch botocore ClientError in pull() and ls_remote() with
  human-readable messages for 403 and NoSuchKey errors

Fixes reactome#114
@mithil27360
Copy link
Copy Markdown
Author

Hi, I've opened a PR that addresses both issues described here.

PR: #159

Happy to make any changes if the approach needs adjustment.

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.

Application crashes with AttributeError when embeddings are missing (S3 download returns 403)

1 participant