Skip to content

Commit d8e5bf9

Browse files
author
thepetk
committed
Fix exception type
1 parent 7d45bfd commit d8e5bf9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitlab2sentry/resources.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ def is_test_env(env: str) -> bool:
161161
if is_test_env(ENV)
162162
else os.environ["GITLAB_MR_KEYWORD"]
163163
)
164-
except TypeError as type_error:
164+
except KeyError as key_error:
165165
logging.error(
166-
"<Gitlab2Sentry>: g2s.yaml not configured properly - {}".format(str(type_error))
166+
"<Gitlab2Sentry>: env vars are not configured properly - {}".format(str(key_error))
167167
)
168168
exit(1)
169169
except ValueError as value_error:
170170
logging.error(
171-
"<Gitlab2Sentry>: g2s.yaml not wrong value type - {}".format(str(value_error))
171+
"<Gitlab2Sentry>: env vars have wrong value type - {}".format(str(value_error))
172172
)
173173
exit(1)
174174

0 commit comments

Comments
 (0)