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

refactor(frontend): service return undefined instead of throwing error #484

Merged

Conversation

faiza-jahanzeb
Copy link
Contributor

Summary

The sin-validation page would throw a 500 when the id was not found.. this goes back to the service module throwing when no data is found instead of returning undefined
The API calls can return 404 but our service should return undefined instead of throwing error

Types of changes

What types of changes does this PR introduce?
(check all that apply by placing an x in the relevant boxes)

  • 🛠️ refactoring -- non-breaking change that improves code readability or structure
  • 🐛 bugfix -- non-breaking change that fixes an issue
  • new feature -- non-breaking change that adds functionality
  • 💥 breaking change -- change that causes existing functionality to no longer work as expected
  • 📚 documentation -- changes to documentation only
  • ⚙️ build or tooling -- ex: CI/CD, dependency upgrades

Checklist

Before submitting this PR, ensure that you have completed the following. You can fill these out now, or after creating the PR.
(check all that apply by placing an x in the relevant boxes)

  • code has been linted and formatted locally
  • added or updated tests to verify the changes
  • added adequate logging for new or updated functionality
  • ensured metrics and/or tracing are in place for monitoring and debugging
  • documentation has been updated to reflect the changes (if applicable)
  • linked this PR to a related issue (if applicable)
Linting and formatting
npm run lint:check
npm run format:check
Unit and e2e tests
npm run test
npm run test:e2e

Additional Notes

If this PR introduces significant changes, explain your reasoning and provide any necessary context here. Feel free to include diagrams, screenshots, or alternative approaches you considered.

Screenshots (if applicable)

Provide screenshots or screen-recordings to help reviewers understand the visual impact of your changes, if relevant.

@faiza-jahanzeb faiza-jahanzeb enabled auto-merge (squash) March 25, 2025 15:04
@faiza-jahanzeb faiza-jahanzeb force-pushed the faiza/services-return-undefined-instead-of-throwing-error branch from 145d258 to 7b68774 Compare March 25, 2025 15:08
@faiza-jahanzeb faiza-jahanzeb force-pushed the faiza/services-return-undefined-instead-of-throwing-error branch from 7b68774 to 7b0a8c9 Compare March 25, 2025 15:23
@faiza-jahanzeb faiza-jahanzeb force-pushed the faiza/services-return-undefined-instead-of-throwing-error branch from 7b0a8c9 to 404ea3a Compare March 25, 2025 15:39
@faiza-jahanzeb faiza-jahanzeb merged commit 8738ef6 into main Mar 25, 2025
6 checks passed
@faiza-jahanzeb faiza-jahanzeb deleted the faiza/services-return-undefined-instead-of-throwing-error branch March 25, 2025 15:42
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