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

Refactor fetchSubregions to return consistent empty array. #189

Closed
2 tasks
OhmSpectator opened this issue Dec 29, 2023 · 0 comments · Fixed by #195
Closed
2 tasks

Refactor fetchSubregions to return consistent empty array. #189

OhmSpectator opened this issue Dec 29, 2023 · 0 comments · Fixed by #195
Labels
enhancement New feature or request front Issues related to Web UI

Comments

@OhmSpectator
Copy link
Member

Description

In the fetchSubregions function, there is a TODO comment suggesting that we should return an empty array instead of null when the response status is 204 (No Content). This change will make the return values consistent across different scenarios, enhancing the predictability and reliability of the function.

Requirements

  • Update the fetchSubregions function so that it returns an empty array [] instead of null when the response.status is 204.
  • Refactor any consuming code that expects null to handle an empty array accordingly.
@OhmSpectator OhmSpectator added enhancement New feature or request front Issues related to Web UI labels Dec 29, 2023
OhmSpectator added a commit that referenced this issue Dec 29, 2023
Added a TODO comment in the API for regions to return an empty array
instead of null when the response status is 204 (No Content).

Issue: #189

Signed-off-by: Nikolay Martyanov <ohmspectator@gmail.com>
OhmSpectator added a commit that referenced this issue Dec 30, 2023
Added a TODO comment in the API for regions to return an empty array
instead of null when the response status is 204 (No Content).

Issue: #189

Signed-off-by: Nikolay Martyanov <ohmspectator@gmail.com>
OhmSpectator added a commit that referenced this issue Dec 31, 2023
Modified fetchSubregions function to return an empty array instead of null when
no subregions are available, aligning with the expected return type and
ensuring consistency in handling empty results across the application.

Issue: #189

Signed-off-by: Nikolay Martyanov <ohmspectator@gmail.com>
@OhmSpectator OhmSpectator linked a pull request Dec 31, 2023 that will close this issue
5 tasks
OhmSpectator added a commit that referenced this issue Dec 31, 2023
Modified fetchSubregions function to return an empty array instead of null when
no subregions are available, aligning with the expected return type and
ensuring consistency in handling empty results across the application.

Issue: #189

Signed-off-by: Nikolay Martyanov <ohmspectator@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front Issues related to Web UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant