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

FS-1783: Relax errors for missing component status #116

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sahil311289
Copy link

This PR logs errors for missing component's status instead of erroring out.

if err != nil {
// Relax error

zap.L().With(
Copy link
Contributor

Choose a reason for hiding this comment

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

You should include the error here as zap.Error(err) and then Warn() with something like "retrieving status versioned attribute"

Also, return the component without a Status field, so we have as much data in the response as we have in the database for this component.

@@ -121,7 +122,8 @@ func composeRecords(ctx context.Context, exec boil.ContextExecutor, cmp *rivets.
}

func retrieveComponentAttributes(ctx context.Context, exec boil.ContextExecutor,
componentID, namespace string) (*rivets.ComponentAttributes, error) {
componentID, namespace string,
) (*rivets.ComponentAttributes, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

please don't break up these lines like this

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.

2 participants