Skip to content

Commit a662500

Browse files
author
Phil Varner
committed
update pystac version and catch more specific error in validation
1 parent c46a601 commit a662500

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pystac-client==v0.3.0
1+
pystac-client==v0.3.2
22
requests
33
pystac
44
pystac[validation]

stac_api_validator/validations.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import List, Tuple, Dict
22
from pystac_client import Client
3+
from pystac import STACValidationError
34
import requests
45
from typing import Callable
56
import re
@@ -169,8 +170,8 @@ def validate_api(root_url: str, post: bool) -> Tuple[List[str], List[str]]:
169170
catalog.validate()
170171
for collection in catalog.get_children():
171172
collection.validate()
172-
except Exception as e:
173-
errors.append(str(e))
173+
except STACValidationError as e:
174+
errors.append(f"pystac error: {str(e)}")
174175

175176
return warnings, errors
176177

0 commit comments

Comments
 (0)