Skip to content

Conversation

@alex-mechler
Copy link
Contributor

@marcaaron and @cead22 will you review please?

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/142656

Tests

  1. Signed in
  2. Sent a message
  3. Signed out
  4. Signed in again

Screenshots

n/a

return response;
})
.then(response => (

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter wanted a blank line here 🙃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you move the comment to be outside of the .then() then the blank line before the comment will look nicer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to update the linter to not complain about this when the comment in one level more indented than the previous line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't find a rule in the linter that would make this pass. Ended up removing the comment, since (imo) it doesn't add a ton to this function overall

tgolen
tgolen previously requested changes Oct 5, 2020
src/lib/API.js Outdated
networkRequestQueue.push({
command,
data,
callback: resolve,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this code a little more consistent, rename callback to resolve.

src/lib/API.js Outdated
}

// Throw an error so we can pass the error up the chain
throw new Error();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify an error message with this error so it's not just a generic error.

src/lib/API.js Outdated
throw new Error(response.message);
}

// Update the authToken so it's used in the call to createLogin below
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Update the authToken so it's used in the call to createLogin below
// Update the authToken so it's used in the call to createLogin below

return response;
})
.then(response => (

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you move the comment to be outside of the .then() then the blank line before the comment will look nicer

src/lib/API.js Outdated
Comment on lines 373 to 375
.finally(() => {
Ion.merge(IONKEYS.SESSION, {loading: false});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.finally(() => {
Ion.merge(IONKEYS.SESSION, {loading: false});
});
.finally(() => Ion.merge(IONKEYS.SESSION, {loading: false}));

cead22
cead22 previously approved these changes Oct 5, 2020
Alexander added 2 commits October 5, 2020 11:38
@alex-mechler
Copy link
Contributor Author

Updated

@alex-mechler
Copy link
Contributor Author

Updated

marcaaron
marcaaron previously approved these changes Oct 5, 2020
Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cead22
cead22 previously approved these changes Oct 6, 2020
src/lib/API.js Outdated
}

// If we already have an error, throw that so we do not swallow it
if (error && error instanceof Error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error && seems unnecessary

@alex-mechler alex-mechler dismissed stale reviews from cead22 and marcaaron via f6d86a3 October 6, 2020 23:56
@marcaaron marcaaron self-requested a review October 6, 2020 23:57
marcaaron
marcaaron previously approved these changes Oct 6, 2020
@alex-mechler
Copy link
Contributor Author

Updated, removed the extra check that wasn't needed

cead22
cead22 previously approved these changes Oct 7, 2020
# Conflicts:
#	src/lib/API.js
@alex-mechler alex-mechler dismissed stale reviews from cead22 and marcaaron via 5d57a86 October 8, 2020 22:18
@alex-mechler
Copy link
Contributor Author

Merge conflicts resolved.

@alex-mechler alex-mechler requested a review from tgolen October 8, 2020 22:23
@tgolen tgolen removed their request for review October 13, 2020 16:37
@Jag96 Jag96 dismissed tgolen’s stale review October 14, 2020 17:57

Requested changes were made and Tim is OOO, dismissing

@Jag96 Jag96 merged commit fced68e into master Oct 14, 2020
@Jag96 Jag96 deleted the amechler-bubble-error branch October 14, 2020 17:58
@MelvinBot MelvinBot mentioned this pull request Jan 29, 2024
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants