Skip to content

Commit 5cdaad8

Browse files
[core] chore: add MissingApiReportFetcher error
1 parent e3a659d commit 5cdaad8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

libs/garf_core/garf_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = '0.1.1'
15+
__version__ = '0.1.2'

libs/garf_core/garf_core/report_fetcher.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ class ApiReportFetcherError(exceptions.GarfError):
3939
"""Base exception for all ApiReportFetchers."""
4040

4141

42+
class MissingApiReportFetcherError(ApiReportFetcherError):
43+
"""Exception for not found report fetcher."""
44+
45+
def __init__(self, source: str) -> None:
46+
"""Initializes MissingApiReportFetcherError."""
47+
self.source = source
48+
49+
def __str__(self) -> str:
50+
return f'No fetcher available for the source "{self.source}"'
51+
52+
4253
class ApiReportFetcher:
4354
"""Class responsible for getting data from report API.
4455

0 commit comments

Comments
 (0)