diff --git a/examples/produce_data_withOptional_country.ipynb b/examples/produce_data_withOptional_country.ipynb
index ac1b8724b3dd84c3d2bd3b87e2cc60cc88b9dac3..c63bf2e17d1a2fa39256867e7af5134c78281732 100644
--- a/examples/produce_data_withOptional_country.ipynb
+++ b/examples/produce_data_withOptional_country.ipynb
@@ -10,7 +10,7 @@
     "from collections import namedtuple\n",
     "from pathlib import Path\n",
     "\n",
-    "from toargridding.toar_rest_client import AnalysisServiceDownload, Connection\n",
+    "from toargridding.toar_rest_client import AnalysisServiceDownload, Connection, EmptyDataError\n",
     "from toargridding.grids import RegularGrid\n",
     "from toargridding.gridding import get_gridded_toar_data\n",
     "from toargridding.metadata import TimeSample\n",
@@ -87,7 +87,7 @@
     "            stats=config.stats,\n",
     "            **config.moreOptions\n",
     "        )\n",
-    "    except KeyError as e:\n",
+    "    except EmptyDataError as e:\n",
     "        print(\"failed for \", person)\n",
     "        continue\n",
     "\n",
diff --git a/toargridding/toar_rest_client.py b/toargridding/toar_rest_client.py
index 30748a63aa1db614558ac18daea49f52c3a0a3e3..ee6862fe8f32a1e9a63750fcf5bb84dd0bb94080 100644
--- a/toargridding/toar_rest_client.py
+++ b/toargridding/toar_rest_client.py
@@ -20,6 +20,14 @@ STATION_LON = "station_coordinates_lng"
 COORDS = [STATION_LAT, STATION_LON]
 
 
+class EmptyDataError(ValueError):
+    """! custom exception for requests, where the analysis service only provides metadata.
+
+    This might be the case, if there are not statuins, or if the statistical analysis does not yield any data points
+    """
+    def __init__(self, message):
+        super().__init__(message)
+
 @dataclass(frozen=True)
 class QueryOptions:
     """Creation of a request to the TOAR database. 
@@ -256,12 +264,14 @@ class Connection:
             try:
                 response.raise_for_status()
             except requests.exceptions.HTTPError as e: 
-                print(f"\tconnection error ({e.response.status_code}: {e.response.reason}). Trying again later")
+                print(f"\tconnection error ({e.response.status_code}: {e.response.reason}).")
                 self.printExecption(e, response)
                 #a Status Code 500 seems indicated an aborted request -> restart the request and continue with new status endpoint
                 if e.response.status_code == 500:
                     self.cache.remove(query_options.cache_key)
                     status_endpoint = self.get_status_endpoint(query_options)
+                else:
+                    print("\t Trying again later.")
                 continue
             #are our results ready to obtain?
             if response.headers["Content-Type"] == "application/zip":
@@ -305,6 +315,7 @@ class Connection:
                 #will be overwritten in the next step.
                 self.cache.remove(query_options.cache_key)
                 print("Removing status endpoint from cache and submitting new request.")
+                pass
             except:
                 raise RuntimeError(f"An error occurred during accessing a cached request")
             else:
@@ -336,12 +347,9 @@ class Connection:
 
             if response.headers["Content-Type"] == "application/json":
                 status_endpoint = response.json()["status"]
-            #else:
-            #    raise Exception( f"Unexpected type of response: {response.headers['Content-Type']}" )
-            #TODO: can this raise cause a problem?
             response.raise_for_status()
         except requests.exceptions.HTTPError as e:
-            print(f"A connection error occurred:")
+            print(f"An HTTP error occurred:")
             self.printExecption(e, response)
             raise e
         except requests.exceptions.ReadTimeout as e:
@@ -500,6 +508,9 @@ class AnalysisService:
     ) -> tuple[pd.DataFrame, pd.DataFrame]:
         """convert downloaded byte stream into pandas dataframes
 
+        throws an EmptyDataError, if the results file does not contain data. 
+        This is a result if there are not stations contributing to a request or if the restrictions of the analysis exclude all points of a station.
+
         Parameters:
         ----------
         content:
@@ -510,8 +521,7 @@ class AnalysisService:
         zip_stream = io.BytesIO(content)
         with ZipFile(zip_stream) as myzip:
             if len(myzip.namelist())==1:
-                print("Downloaded data do not contain a timeseries.")
-                raise KeyError("Data file is empty")#TODO replace this with a custom exception.
+                raise EmptyDataError("Data file from TOAR analysis service is empty")
             timeseries = self.extract_data(myzip, metadata.statistic)
             timeseries_metadata = self.extract_data(myzip, AnalysisService.METADATA)
 
@@ -536,7 +546,7 @@ class AnalysisServiceDownload(AnalysisService):
     """download service with caching of requests to the TOARDB
 
     This service performs the request to the TOAR database and downloads the results of the request to disc before returning if for further processing.
-    When retrieving data, a check is donw, if this request has already been cached on disc.
+    When retrieving data, a check is done, if this request has already been cached on disc.
 
     Attributes:
     ----------