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

fix: Improve LagoApiError details #272

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

vincent-pochet
Copy link
Contributor

@vincent-pochet vincent-pochet commented Sep 9, 2024

This PR fixes #266

It makes sure that LagoApiError shows a comprehensible message in the output. It will render the API response, allowing user to quickly understand the source of the error.

Before

lago_python_client.exceptions.LagoApiError

After

lago_python_client.exceptions.LagoApiError: {'status': 422, 'error': 'Unprocessable Entity', 'code': 'validation_errors', 'error_details': {'transaction_id': ['value_already_exist']}}

@vincent-pochet vincent-pochet added the bug Something isn't working label Sep 9, 2024
@vincent-pochet vincent-pochet changed the title fix: Improve LagoApiError fix: Improve LagoApiError details Sep 9, 2024
@vincent-pochet vincent-pochet merged commit 6c275cd into main Sep 9, 2024
7 checks passed
@vincent-pochet vincent-pochet deleted the fix-error-message branch September 9, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uninformative exceptions
2 participants