-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: make error strings better (#42)
This commit makes our error messages better since our errors weren't stringifying properly. It also adds a `timeout_ms` parameter to the `TimeoutError` so users get a proper feedback of what the current timeout is set at.
- Loading branch information
1 parent
34ff84c
commit c2d3d35
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
kind: Under the Hood | ||
body: Better error messages | ||
time: 2024-09-06T18:49:39.208985+02:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from dbtsl.error import SemanticLayerError, TimeoutError | ||
|
||
|
||
def test_error_str() -> None: | ||
assert str(SemanticLayerError()) == "SemanticLayerError" | ||
|
||
|
||
def test_error_repr() -> None: | ||
assert repr(SemanticLayerError()) == "SemanticLayerError" | ||
|
||
|
||
def test_timeout_error_str() -> None: | ||
assert str(TimeoutError(timeout_ms=1000)) == "TimeoutError(timeout_ms=1000)" |