Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNTOR-3393: first pass of refactoring some util functions #4892

Merged
merged 26 commits into from
Aug 5, 2024
Merged

Conversation

mansaj
Copy link
Collaborator

@mansaj mansaj commented Jul 30, 2024

References:

Jira: MNTOR-3393

Description

First pass of some refactoring:

  • Get rid of InternalServiceError (see ticket)
  • Refactored FxA and HIBP util

Checklist (Definition of Done)

  • Commits in this PR are minimal and have descriptive commit messages.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

Copy link

@mansaj mansaj marked this pull request as ready for review July 31, 2024 21:58
@mansaj mansaj requested review from Vinnl, rhelmer, codemist and flozia July 31, 2024 21:58
@mansaj mansaj changed the title MNTOR-3393: refactoring some errors MNTOR-3393: first pass of refactoring some util functions Jul 31, 2024
Copy link
Collaborator

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

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

This looks much better! I see a stray getMessage but the other pattern I noticed is that throwing Response objects that fail the .ok check probably aren't logging as much info as you want to be able to diagnose failures

src/db/tables/emailAddresses.js Outdated Show resolved Hide resolved
src/utils/fxa.ts Outdated Show resolved Hide resolved
src/utils/fxa.ts Outdated Show resolved Hide resolved
@mansaj mansaj requested a review from flodolo as a code owner August 1, 2024 18:16
@mansaj mansaj requested a review from rhelmer August 2, 2024 00:34
@mansaj
Copy link
Collaborator Author

mansaj commented Aug 2, 2024

@flodolo deleting a string here: error-could-not-add-email since we are no longer using it.
Should I do it for all the files or just in en?

Copy link
Collaborator

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

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

lgtm overall but I'm unsure about one part of the error handling.

src/utils/fxa.ts Show resolved Hide resolved
codemist
codemist approved these changes Aug 2, 2024
@mansaj mansaj requested a review from rhelmer August 2, 2024 20:55
@mansaj mansaj merged commit 726bf8e into main Aug 5, 2024
15 checks passed
@mansaj mansaj deleted the MNTOR-3393 branch August 5, 2024 15:27
Copy link

github-actions bot commented Aug 5, 2024

Cleanup completed - database 'blurts-server-pr-4892' destroyed, cloud run service 'blurts-server-pr-4892' destroyed

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.

5 participants