Skip to content

Commit b532058

Browse files
committed
remove debug prints.
1 parent 5c972d1 commit b532058

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

stac_fastapi/core/stac_fastapi/core/utilities.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def remove_commands(commands: List[str], path: ElasticPath) -> None:
217217
path (ElasticPath): Path to value to be removed
218218
219219
"""
220-
print("REMOVE PATH", path)
221220
if path.index is not None:
222221
commands.append(f"def temp = ctx._source.{path.location}.remove({path.index});")
223222

@@ -336,7 +335,6 @@ def operations_to_script(operations: List) -> Dict:
336335

337336
source = commands_to_source(commands=commands)
338337

339-
print("____SOURCE", source)
340338
return {
341339
"source": source,
342340
"lang": "painless",

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,6 @@ async def json_patch_item(
993993
if "to_string" in exc.info["error"]["caused_by"]
994994
else exc.info["error"]["caused_by"]
995995
)
996-
print("____________EXC INFO", exc.info)
997996
raise HTTPException(status_code=400, detail=detail) from exc
998997

999998
item = await self.get_one_item(collection_id, item_id)
@@ -1229,10 +1228,12 @@ async def json_patch_collection(
12291228
)
12301229

12311230
except exceptions.BadRequestError as exc:
1232-
print("EXC", exc.info)
1233-
raise HTTPException(
1234-
status_code=400, detail=exc.info["error"]["caused_by"]["to_string"]
1235-
) from exc
1231+
detail = (
1232+
exc.info["error"]["caused_by"]["to_string"]
1233+
if "to_string" in exc.info["error"]["caused_by"]
1234+
else exc.info["error"]["caused_by"]
1235+
)
1236+
raise HTTPException(status_code=400, detail=detail) from exc
12361237

12371238
collection = await self.find_collection(collection_id)
12381239

0 commit comments

Comments
 (0)