[Backend] Returns with code 500 upon submission of wrong URL
- Dominant language
- Python
- Stars
- 2k
- Forks
- 984
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 14
Description
Backend returns with code **500 (Internal server error** when a file with wrong extension is submitted for a challenge. It should return with **400 (Bad request)**
Example: Submitting a `.py` file URL to a challenge that doesn't accept `.py` files
If you'd like to report a bug, please include the following information:
- Expected behaviour
It should return with a `400 Bad Request`
- Observed behaviour
Server gives a `500 Internal Server Error`
- Steps to reproduce the problem
1. Choose any challenge
2. Submit a file URL with `.py` (or `.cpp`, etc) extension
3. Observe the error
Upon submitting a file URL with `.py` extension

Contributor guide
Research direction
Start by reproducing the submission with an unsupported file extension, such as `.py`, and trace the backend request handling described in the issue. Done means the same invalid submission returns HTTP 400 instead of HTTP 500, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100