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

task: Make repository errors more user-friendly #5410

Open
ogenstad opened this issue Jan 9, 2025 · 0 comments
Open

task: Make repository errors more user-friendly #5410

ogenstad opened this issue Jan 9, 2025 · 0 comments
Labels
group/backend Issue related to the backend (API Server, Git Agent) state/need-triage This issue needs to be triaged type/task Body of work related to an epic

Comments

@ogenstad
Copy link
Contributor

ogenstad commented Jan 9, 2025

Component

API Server / GraphQL

Task Description

After the introduction of Prefect we now catch any raised errors and show them in the logs which can lead to task logs that look like this:

Screenshot 2025-01-08 at 17 02 10

It comes from this section of the code:
https://github.com/opsmill/infrahub/blob/infrahub-v1.1.1/backend/infrahub/git/integrator.py#L176-L201

Instead of raising the error we should check if it's an error from a base exception in Infrahub or the SDK and use the .message attribute for the log and only raise an error like this if the error is of a different kind.

Previously these raised errors would have been caught by the git-agent (https://github.com/opsmill/infrahub/blob/infrahub-v1.1.1/backend/infrahub/message_bus/operations/__init__.py#L57-L68).

@ogenstad ogenstad added group/backend Issue related to the backend (API Server, Git Agent) type/task Body of work related to an epic labels Jan 9, 2025
@exalate-issue-sync exalate-issue-sync bot added the state/need-triage This issue needs to be triaged label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) state/need-triage This issue needs to be triaged type/task Body of work related to an epic
Projects
None yet
Development

No branches or pull requests

1 participant