Skip to content

Commit

Permalink
More explicit differentiation between exception classes
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph H Kennedy <me@jhkennedy.org>
  • Loading branch information
mfisher87 and jhkennedy authored Feb 11, 2025
1 parent 1c5de64 commit 6ce736a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion earthaccess/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ class LoginStrategyUnavailable(Exception):


class LoginAttemptFailure(Exception):
"""The login attempt failed."""
"""The login attempt failed.
This should be raised when a login attempt fails, for example, because
the user's credentials were rejected.
DO NOT raise this exception when a login strategy can't be attempted. For
example, this exception would not be thrown when "environment" was selected
but the envvars are not populated; a `LoginStrategyUnavailable` should be
thrown instead.
"""

pass

0 comments on commit 6ce736a

Please sign in to comment.