500 Server Error
Closed this issue · 1 comments
Describe the Bug
When submitting an application form, a 500 error is returned to the user, despite the application being successfully stored in the database with the correct status.
To Reproduce
Steps to reproduce the behavior:
Steps to reproduce the behavior:
- Log in to the application
- Navigate to the application submission page
- Fill out the application form with valid data
- Click the submit button
- Observe 500 error page instead of successful submission page
Expected behavior
After submitting the form, the user should be redirected to the success page (status page) without encountering a 500 error. The application should be stored in the database and marked as submitted.
Additional context
- The application data is being correctly saved to the database despite the 500 error.
- The application status is correctly updated to "submitted", and submission is viewable in Applications
- The submitted application is viewable in the admin dashboard.
- Django logs do not provide additional information beyond the 500 error.
- The error occurs after successful database operations but before the response is sent back to the client.
- This issue affects the user experience but does not seem to impact data integrity.
Fixed. I had to enable debug logging for Gunicorn because print statements were not appearing in the Heroku logs. But the issue was just an incorrectly formatted template tag in the "application submitted" email template. Hopefully the ability to actually see print statements and exceptions in the logs will come in handy in the future! 😁