Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/improve-error-messaging-for-role-forbidden #5554

Merged

Conversation

burtenshaw
Copy link
Contributor

Description

Closes #<issue_number>

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

Copy link
Member

@davidberenstein1957 davidberenstein1957 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this works great. I believe this is specifically for dataset creation but shouldn't we be covering the basic scenario of rg.Argilla(api_url="correct", api_key="wrong") as well?

@burtenshaw
Copy link
Contributor Author

I think this works great. I believe this is specifically for dataset creation but shouldn't we be covering the basic scenario of rg.Argilla(api_url="correct", api_key="wrong") as well?

I've improved that with changes to the message in argilla/src/argilla/_exceptions/_api.py . We also already have a validation message in argilla/src/argilla/_exceptions/_client.py that says: ""Credentials (api_key and/or api_url) are invalid"".

@davidberenstein1957
Copy link
Member

I think this works great. I believe this is specifically for dataset creation but shouldn't we be covering the basic scenario of rg.Argilla(api_url="correct", api_key="wrong") as well?

I've improved that with changes to the message in argilla/src/argilla/_exceptions/_api.py . We also already have a validation message in argilla/src/argilla/_exceptions/_client.py that says: ""Credentials (api_key and/or api_url) are invalid"".

but perhaps it would be nice if we could also share a similar message, urging the user to go to my-settings with their owner account?

@burtenshaw burtenshaw requested a review from frascuchon October 2, 2024 10:17
@burtenshaw burtenshaw merged commit f41b643 into develop Oct 2, 2024
6 of 7 checks passed
@burtenshaw burtenshaw deleted the enhancement/improve-error-messaging-for-role-forbidden branch October 2, 2024 12:30
frascuchon added a commit that referenced this pull request Oct 2, 2024
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->

Closes #<issue_number>

**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Refactor (change restructuring the codebase without changing
functionality)
- Improvement (change adding some improvement to an existing
functionality)
- Documentation update

**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->

**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->

- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Paco Aranda <[email protected]>
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.

3 participants