kshitij10496 / hercules

The mighty hero helping you build projects on top of IIT Kharagpur's academic data
https://hercules-10496.herokuapp.com/api/v1/static/index.html
MIT License
34 stars 18 forks source link

Input validation checks #34

Open kshitij10496 opened 5 years ago

kshitij10496 commented 5 years ago

Task: Implement input validation checks/methods on the parameters sent by the user.

Currently, all the endpoint handlers expectedly delegate the task of validation to the corresponding logic layer. Now, its the responsibility of the logic layer to perform input validation and return proper errors back to the handler.

In order to start with the fix, we need to discuss what constitutes a valid entity. For example, what needs to be checked in order to assure that a department/course is valid?

P.S: This would form the basis of developing a better error handling mechanism. 😄