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-3355: integration with e2e, support for email hash based mock-data retrieval #4763

Merged
65 commits merged into from
Jul 19, 2024

Conversation

mozilloid
Copy link
Collaborator

@mozilloid mozilloid commented Jul 8, 2024

References:

Jira: MNTOR-3355, MNTOR-3140, MNTOR-3141
Figma:

Description

Mock Endpoints finalized, with emails as environment variables based data retrieval.

Screenshot (if applicable)

Not applicable.

How to test

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • 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.
mansaj and others added 30 commits May 28, 2024 18:21
@mozilloid mozilloid requested a review from mansaj July 8, 2024 06:31
@mozilloid mozilloid marked this pull request as ready for review July 8, 2024 06:31
@mozilloid mozilloid changed the title Mntor-3355 Jul 8, 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.

The stack trace is from minified source but I suspect the error you're seeing here is from:

throw new InternalServerError(getMessage('error-hibp-connect'))

The problem is probably that the test server isn't running on the IP address and/or port that is configured. The reason the error message is so confusing here is that:

  1. it uses the old deprecated InternalServerError object, which in the pre-NextJS app (ExpressJS) translated these into HTTP errors automatically
  2. it is attempted to localize the error message, which as a practice I think doesn't make much sense to do because the user should generally never see this
  3. (2) is calling the deprecated getMessage l10n function but it's failing for some reason

I'll make sure we have a ticket in the tech debt backlog to fix (1), for the purposes of this bug I'd suggest changing InternalServerError(getMessage(...) in src/utils/hibp.js to just return InternalServerError(...) and see if that gives you better error messages.

We should also move away from InternalServerError altogether but I see it is used a ton in the oldest pre-TS/Next code (src/db and src/utis) which is why I'm filing that in the backlog, feels like a bigger task to refactor all of that.

@mozilloid mozilloid closed this pull request by merging all changes into main in 6abed0c Jul 19, 2024
@mozilloid mozilloid deleted the mntor-3355 branch July 19, 2024 05:28
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants