hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FIX] [ANCHOR: BE JAVA] Handle Failed Command to Send Template on Squeeze Page #1163

Open olika-ashley opened 3 months ago

olika-ashley commented 3 months ago

Description

During the user submission process on the squeeze page, the backend command responsible for sending a template (e.g., a welcome email or confirmation) may fail. This issue needs to be addressed by implementing robust error handling to prevent disruptions in the user experience and ensure that all relevant details are correctly logged.

Acceptance Criteria

Implement detection mechanisms for when the command to send a template fails during the squeeze page form submission. Develop error handling logic to manage the failure, including potential retry mechanisms and user notification protocols. Ensure that all failures are logged with sufficient detail for troubleshooting and analysis. Validate that the user's details are still saved in the database even if the template fails to send. Confirm through testing that the squeeze page remains functional and the user is informed of any issues appropriately.

Requirements

Integrate logic to detect failed template-sending commands. Develop and implement error handling, including retries and user notifications. Ensure detailed logging of all failures for backend troubleshooting. Verify that the data submission process is robust, even in the event of a template-sending failure. Conduct tests to ensure backend functionality remains stable and responsive under failure conditions.

Expected Outcome

The backend successfully detects and handles failures in the template-sending process, logs them for future troubleshooting, and ensures that the user's data is securely saved. The user is notified of any issues without experiencing a loss of functionality on the squeeze page.