Skip to content

Commit e4cc4b5

Browse files
authored
CM-59577: handle 401 errors gracefully in scans (#384)
1 parent 8a53aed commit e4cc4b5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cycode/cli/exceptions/custom_exceptions.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ class ReportAsyncError(CycodeError):
4747
pass
4848

4949

50-
class HttpUnauthorizedError(RequestError):
50+
class HttpUnauthorizedError(RequestHttpError):
5151
def __init__(self, error_message: str, response: Response) -> None:
52-
self.status_code = 401
53-
self.error_message = error_message
54-
self.response = response
55-
super().__init__(self.error_message)
52+
super().__init__(401, error_message, response)
5653

5754
def __str__(self) -> str:
5855
return f'HTTP unauthorized error occurred during the request. Message: {self.error_message}'

0 commit comments

Comments
 (0)