📜 Description

When providing an invalid ID to the /subscribers/id [DELETE] endpoint, a 500 error is returned if the ID is invalid. Valid IDs appear to work as expected.

👟 Reproduction steps

  1. Call https://api.novu.co/v1/subscribers/{id} where ID is not a subscriber in the system.
  2. 500 is returned.

👍 Expected behavior

Return some other status code (404?, 400?) with an appropriate JSON body. Perhaps SUBSCRIBER_ID_INVALID as a message

👎 Actual Behavior with Screenshots

💻 Operating system

Linux

🤖 Node Version

Cloud

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

No response

From SyncLinear.com

0

Thanks for reporting. Fixed here: https://github.com/novuhq/novu/pull/2090

0
© 2022 pullanswer.com - All rights reserved.