-
Notifications
You must be signed in to change notification settings - Fork 66
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
Ensure Pipelines don't fall over if Device Groups are unavailable #4975
Conversation
Fundamentally I don't like swallowing errors and making them non-tracable. If it's a 404 code, I get it, but in that case can we check if |
Fair feedback - will make it so |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4975 +/- ##
=======================================
Coverage 78.43% 78.43%
=======================================
Files 325 325
Lines 15353 15353
Branches 3530 3530
=======================================
Hits 12042 12042
Misses 3311 3311
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
try { | ||
this.deviceGroups = (await ApplicationApi.getDeviceGroups(this.application.id)).groups | ||
} catch (err) { | ||
if (err.request.status === 404) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZJvandeWeg I've handled it here now, will show an alert to the user if we see an error we aren't expecting
Description
If Device Groups are not available to a Team, then the API returns a
404
, in turn, this was causing the Pipelines (Create) page to fall over when trying to load the list of available Device Groups.This PR puts in relevant catchers to ensure the page still loads