Skip to content

Commit

Permalink
Merge pull request #53 from Authress/invert-logging-method-result
Browse files Browse the repository at this point in the history
Invert log message for no existing session.
  • Loading branch information
wparad authored Sep 24, 2024
2 parents 29a1f02 + a83ba44 commit 2cd5ecc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/httpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class HttpClient {
}
return {
url,
method,
headers: response.headers,
status: response.status,
data: responseBody
Expand Down Expand Up @@ -158,8 +159,9 @@ class HttpClient {
}

const httpError = {
url: url,
status: status,
url,
method,
status,
data: resolvedError,
headers: error.headers
};
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class LoginClient {
}
} catch (error) {
// On 400, 404, 409 we know that the session is no longer able to be continued.
if (error.status !== 400 && error.status !== 404 && error.status !== 409) {
if (error.status === 400 || error.status === 404 || error.status === 409) {
this.logger && this.logger.log && this.logger.log({ title: 'User does not have an existing authentication session', error });
} else {
this.logger && this.logger.log && this.logger.log({ title: 'Failed attempting to check if the user has an existing authentication session', error });
Expand Down

0 comments on commit 2cd5ecc

Please sign in to comment.