-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Description
When a pre-enrollment already exists the API returns a 404 status code. This code is not the most appropriate. It should be a 400 status code.
Originally posted by @mariajgrimaldi in #289 (comment)
Possible Solution
The NotFound class by default has this status code:
| raise NotFound(f'Pre-enrollment already exists for email: {email} course_id: {course_id}') from IntegrityError |
Maybe using the
ValidationError class (400) in this case is better.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels