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): update subscriber template preferences with wrong template id #2881

Merged

Conversation

LetItRock
Copy link
Contributor

What change does this PR introduce?

Fixes the Sentry issue: https://novu-r9.sentry.io/issues/3841226005/?project=6248811&query=is%3Aunresolved&referrer=issue-stream

When the PATCH /v1/subscribers/:subscriberId/preferences/:templateId is triggered with wrong templateId the API breaks with 500 error.

Why was this change needed?

Other information (Screenshots)

Screenshot 2023-02-22 at 10 30 46
Screenshot 2023-02-22 at 10 30 34

@LetItRock LetItRock self-assigned this Feb 22, 2023
@linear
Copy link

linear bot commented Feb 22, 2023

@@ -61,6 +61,28 @@ describe('Update Subscribers preferences - /subscribers/:subscriberId/preference
}
});

it('should send a Not Found Request error if template id is wrong', async function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏🏻

@LetItRock LetItRock added this pull request to the merge queue Feb 24, 2023
Merged via the queue into next with commit 290c3e0 Feb 24, 2023
@LetItRock LetItRock deleted the nv-1752-update-template-preferences-fix-wrong-template-id branch February 24, 2023 13:08
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.

None yet

3 participants