You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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>
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>
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>
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>
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
fetchSubregions
function so that it returns an empty array[]
instead ofnull
when theresponse.status
is 204.null
to handle an empty array accordingly.The text was updated successfully, but these errors were encountered: