Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sankeerth <[email protected]>
  • Loading branch information
shrouti1507 and sanpj2292 authored Jan 31, 2024
1 parent 314dc63 commit 345f903
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/v0/util/facebookUtils/networkHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ const errorDetailsMap = {
'The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons',
)
.build(),

463: new ErrorDetailsExtractorBuilder()
.setStatus(400)
.setStat({
[tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ACCESS_TOKEN_EXPIRED,
})
.setMessageField('message')
.build(),
default: new ErrorDetailsExtractorBuilder()
.setStatus(400)
.setStat({
Expand Down Expand Up @@ -251,7 +259,7 @@ const errorResponseHandler = (destResponse) => {
}
const { error } = response;
const { status, errorMessage, stats: errorStatTags } = getStatus(error);
if (isDefinedAndNotNull(errorStatTags) && errorStatTags?.errorType === 'accessTokenExpired') {
if (isDefinedAndNotNull(errorStatTags) && errorStatTags?.[tags.TAG_NAMES.ERROR_TYPE] === 'accessTokenExpired') {
throw new ConfigurationAuthError(`${errorMessage}`);
}
throw new NetworkError(
Expand Down

0 comments on commit 345f903

Please sign in to comment.