Skip to content

Commit

Permalink
Merge pull request #228 from Samweli/update_api_connection_message
Browse files Browse the repository at this point in the history
Handle STACTypeError from pystac
  • Loading branch information
Samweli authored Mar 27, 2023
2 parents 1f2c20f + 4f38b8e commit 0c3293f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/qgis_stac/api/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
from pystac_client import Client
from pystac_client.exceptions import APIError

from pystac.errors import STACTypeError

from ..utils import log, tr

from ..conf import settings_manager
Expand Down Expand Up @@ -136,7 +138,12 @@ def run(self):
self.pagination = ResourcePagination()
else:
raise NotImplementedError
except (APIError, NotImplementedError, JSONDecodeError) as err:
except (
APIError,
NotImplementedError,
JSONDecodeError,
STACTypeError
) as err:
log(str(err))
self.error = str(err)

Expand Down

0 comments on commit 0c3293f

Please sign in to comment.