Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Benmuiruri committed Feb 17, 2025
1 parent 4c5aa85 commit 8c2f5ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/authentication-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class AuthError extends Error {
}

static INVALID_CREDENTIALS() {
return new AuthError(401, 'Invalid username or password');
return new AuthError(403, 'Invalid username or password');
}

static MISSING_CREDENTIALS() {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cht-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class ChtSession {
}
return token;
} catch (e: any) {
if (e?.response?.status === 401) {
if (e?.response?.status === 403) {
throw AuthError.INVALID_CREDENTIALS();
}
throw e;
Expand Down

0 comments on commit 8c2f5ce

Please sign in to comment.