Skip to content

Conversation

@StaberindeZA
Copy link
Contributor

@StaberindeZA StaberindeZA commented Jun 3, 2025

Because

  • NestJSActionService throws an error, listed below when TaxService.getTaxAddress can not resolve the IP address to a location.
    • Cannot read properties of undefined (reading 'constructor')

This pull request

  • NextJSActionService.getTaxAddress returns empty object when location is undefined.
  • Logs the IP address to console

Issue that this pull request solves

Closes: #FXA-11708

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Additional info

I was able to replicate this issue by connecting to the Mozilla VPN - Phoenix AZ node, and navigating to the /new page.

@StaberindeZA StaberindeZA requested a review from a team as a code owner June 3, 2025 22:01
postalCode: location.postalCode,
} satisfies TaxAddress;
if (!location) {
this.log.log('TaxService.getTaxAddress.noLocation', { ipAddress })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still discussing whether or not to include ipAddress in the console log.

@StaberindeZA StaberindeZA force-pushed the fxa-11708-handle-empty-ip-address branch from 121f3c8 to 831e1d3 Compare June 4, 2025 15:19
Because:

- NestJSActionService throws an error, listed below when
  TaxService.getTaxAddress can not resolve the IP address to a location.
  - Cannot read properties of undefined (reading 'constructor')

This commit:

- NextJSActionService.getTaxAddress returns empty object when location
  is undefined.
- Logs the IP address to console

Closes #FXA-11708
@StaberindeZA StaberindeZA force-pushed the fxa-11708-handle-empty-ip-address branch from 831e1d3 to 3f99181 Compare June 4, 2025 15:48
@StaberindeZA StaberindeZA merged commit 17dfc80 into main Jun 4, 2025
19 checks passed
@StaberindeZA StaberindeZA deleted the fxa-11708-handle-empty-ip-address branch June 4, 2025 16:17
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.

3 participants