-
Story
-
Resolution: Won't Do
-
Undefined
-
None
-
None
-
Quality / Stability / Reliability
-
3
-
False
-
-
False
-
-
-
3
-
OCMUI Core Sprint 270, OCMUI Core Sprint 271
The useFetchClusterAddOns hook currently does not properly handle cases where the clusterID is undefined. This can lead to unclear behavior and potential issues if the hook assumes a valid clusterID without validation.
Proposed Changes
- Update the useFetchClusterAddOns hook signature:
-
- Add internal validation to explicitly check for null or undefined clusterID values.
-
- Ensure existing error handling mechanisms are preserved.
- Update all components consuming useFetchClusterAddOns:
-
- Ensure that they handle scenarios where clusterID might be undefined before calling the hook.
-
- Components should return a specific error or avoid calling the hook if the ID is invalid.
Acceptance Criteria
- The useFetchClusterAddOns hook requires a clusterID parameter (not optional).
- All consuming components are updated to validate or guard against undefined clusterID.
- Existing functionality and user experience remain unchanged.
- Error handling for invalid or missing clusterID is maintained.
Technical Notes
- This task is part of a broader initiative to standardize clusterID handling across hooks.
- Similar updates will be applied to additional hooks in future work.
- No breaking changes to public APIs or contracts are expected.
Dependencies
- None