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

[AiLab] protect against errors in metadata retrieval #39133

Merged
merged 1 commit into from Feb 19, 2021
Merged

Conversation

Erin007
Copy link
Contributor

@Erin007 Erin007 commented Feb 18, 2021

HoneyBadger Error 1
HoneyBadger Error 2

There were a few scenarios where api/v1/ml_models/metadata/:model_id could cause an errors.

If no model was found => NoMethodError undefined method 'metadata' for NilClass
If a model was found, but didn't have metadata => no implicit conversion of nil into String when we try to parse

I added safe operators and a check that metadata != nil to prevent these errors from happening.

@Erin007 Erin007 changed the title [AiLab] protect against undefined method error in metadata retrieval [AiLab] protect against errors in metadata retrieval Feb 18, 2021
Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

thanks for following up!

@Erin007 Erin007 merged commit 1178284 into staging Feb 19, 2021
@Erin007 Erin007 deleted the metadata-hb branch February 19, 2021 17:09
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.

None yet

3 participants