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

fix(DTFS2-7203): fix bug where /companies returns 500 for companies w/o SIC codes #932

Conversation

oscar-richardson-softwire
Copy link
Contributor

@oscar-richardson-softwire oscar-richardson-softwire commented Jun 10, 2024

Introduction ✏️

As part of https://ukef-dtfs.atlassian.net/browse/DTFS2-7051, we created a new APIM endpoint for returning details from Companies House. During local dev, it was noticed that this new endpoint was returning 500 responses for companies without SIC codes, such as https://find-and-update.company-information.service.gov.uk/company/SL00911A.

Resolution ✔️

  • fixed bug by adding ? guard when calling forEach on property
  • added unit test for bug

Miscellaneous ➕

  • added ? guard for other properties
  • added unit tests for these cases
  • fixed lint issue

abhi-markan
abhi-markan previously approved these changes Jun 10, 2024
Copy link
Contributor

@abhi-markan abhi-markan left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

Copy link

sonarcloud bot commented Jun 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@abhi-markan abhi-markan merged commit d397861 into main Jun 11, 2024
17 checks passed
@abhi-markan abhi-markan deleted the fix/DTFS2-7203/companies-house-endpoint-returns-500-for-companies-without-sic-codes branch June 11, 2024 10:11
abhi-markan added a commit that referenced this pull request Jun 12, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.21.2](v1.21.1...v1.21.2)
(2024-06-12)


### Bug Fixes

* **DTFS2-7203:** fix bug where /companies returns 500 for companies w/o
SIC codes
([#932](#932))
([d397861](d397861))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

2 participants