Skip to content

Commit

Permalink
Undid changes to HTTPExceptions being raised
Browse files Browse the repository at this point in the history
  • Loading branch information
vectoroid committed Jun 27, 2022
1 parent 160bc34 commit 8f81208
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion carto/api/routers/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ def __init__(
async def get_root():
logger.info("Retrieving list of Carto Features currently saved to DB.")
feature_list = await Feature.fetch()
if len(feature_list) < 1:
raise NotFoundHTTPException
return feature_list

@features.get("/features")
async def list_features():
return await Feature.fetch()
features = await Feature.fetch()
if len(features) < 1:
raise NotFoundHTTPException
return features

@features.get("/features/{feature_id}", response_model=Feature)
async def find_feature(feature_id: typing.Union[UUID, str]):
Expand Down

0 comments on commit 8f81208

Please sign in to comment.