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

feat: displaying generated errors #93

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

andrey-canon
Copy link
Collaborator

Description

Shows generated errors during the create_external_certificate_action execution

Results

image

)
except Exception as exc: # pylint: disable=broad-exception-caught
errors_by_class = errors.get(exc.__class__.__name__, {})
Copy link
Collaborator

@johanseto johanseto Sep 8, 2023

Choose a reason for hiding this comment

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

This block is a little strange. What do you think about something like:

if errors.get(exc.__class__.__name__, {}):
   errors[exc.__class__.__name__]['ids'].append(certificate.id)
   errors[exc.__class__.__name__]['total'] = errors['exc.__class__.__name__']['total'] + 1
else:
   errors[exc.__class__.__name__] = {"ids": [certificate.id], "total": 1}

By the way they do the same. I think so...

@johanseto johanseto self-requested a review September 8, 2023 20:27
Copy link
Collaborator

@johanseto johanseto left a comment

Choose a reason for hiding this comment

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

LGTM

@andrey-canon andrey-canon merged commit 0b51c8f into master Sep 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants