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(api): centralize upsert validation + improve nested error handling #7173

Merged

Conversation

tatarco
Copy link
Contributor

@tatarco tatarco commented Nov 30, 2024

feat(api): add upsert validation

What changed? Why was the change needed?

  1. Established a single validation entry point for Upsert use case.
  2. Fixed issue with nested validation based on @djabarovgeorge solution in an old open PR.
  3. Removed the Base Command duplication so all commands use the same validation mechanism.
  4. Fix Wrong Validations around issues in internal commands ( update + create)
  5. Enhance the Filter to produce better and more detailed 400 errors around validation issues.
  6. Make sure post process process update issues if no issues exist instead of empty object, the class validator does not handle empty object well for Record<string,?>
  7. Added tests to validate correct behavior around tags and missing step name, make sure both fire good validation 400 erors

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

linear bot commented Nov 30, 2024

Copy link

netlify bot commented Nov 30, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 8de9cc0
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/675a77680f756d0008e36ead
😎 Deploy Preview https://deploy-preview-7173.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 30, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit 5bb5222
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/674dad98da4f340008d9a043
😎 Deploy Preview https://deploy-preview-7173.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 30, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 8de9cc0
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/675a77682c5f87000829502a
😎 Deploy Preview https://deploy-preview-7173.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Nov 30, 2024

Open in Stackblitz

@novu/client

npm i https://pkg.pr.new/novuhq/novu/@novu/client@7173

@novu/framework

npm i https://pkg.pr.new/novuhq/novu/@novu/framework@7173

@novu/headless

npm i https://pkg.pr.new/novuhq/novu/@novu/headless@7173

@novu/node

npm i https://pkg.pr.new/novuhq/novu/@novu/node@7173

@novu/notification-center

npm i https://pkg.pr.new/novuhq/novu/@novu/notification-center@7173

novu

npm i https://pkg.pr.new/novuhq/novu@7173

@novu/providers

npm i https://pkg.pr.new/novuhq/novu/@novu/providers@7173

@novu/shared

npm i https://pkg.pr.new/novuhq/novu/@novu/shared@7173

commit: 8de9cc0

@tatarco tatarco force-pushed the nv-4918-preview-returns-500-if-the-step-has-a-missing-name branch from 04202ec to 79534f2 Compare December 12, 2024 05:21
@tatarco tatarco merged commit 09da5ec into next Dec 12, 2024
43 of 44 checks passed
@tatarco tatarco deleted the nv-4918-preview-returns-500-if-the-step-has-a-missing-name branch December 12, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants