Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepearson committed Sep 3, 2024
1 parent 0f9f1f5 commit de71ab3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/geoapis/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ def run(self, layer: int) -> pathlib.Path:
url=f"{self.base_url}/exports/", headers=headers, json=api_query
)
json_query = response.json()
if not json_query["is_valid"]:
logging.warning(
"Invalid initial query. Check layer exists and is within bounds. "
f"json_query['invalid_reasons']: {json_query['invalid_reasons']}. "
f"json_query['items'][0]['invalid_reasons']: {json_query['items'][0]['invalid_reasons']}"
)
if "is_valid" in json_query.keys() and not json_query["is_valid"]:
message = f"Invalid initial query. Check layer {layer} exists and is within bounds."
if "invalid_reasons" in json_query.keys():
message = message + f" json_query['invalid_reasons']: {json_query['invalid_reasons']}."
if "items" in json_query.keys():
message = message + f" json_query['items'][0]['invalid_reasons']: {json_query['items'][0]['invalid_reasons']}"
logging.warning(message)
return []
query_id = json_query["id"]

Expand Down

0 comments on commit de71ab3

Please sign in to comment.