PyJaipur / PyJudge

Simple Programming Contest hosting software
MIT License
17 stars 29 forks source link

Raise error in proper places #123

Open theSage21 opened 5 years ago

theSage21 commented 5 years ago

It might be a good idea to use abort(404, <reason>) in some places like

some places however don't require the error. For example this

does not require an error.

soumilk commented 5 years ago

I would like to take this issue, basically in this, instead of a statement "contest does not exist", we should raise an abort 404 page error ?

theSage21 commented 5 years ago

that's the basic idea. you will need to find other places in the code where this has to be done.

soumilk commented 5 years ago

ohk ... i am on it

soumilk commented 5 years ago

I have gone through the server.py and it seems that it has raised abort(404) at certain places already, couldn't find places which require error. Help required . And I thought to add a cool looking error page 404. Have a look, we can add it to the project.

Screenshot from 2019-05-26 14-29-27

theSage21 commented 5 years ago

well, there are a few places where we are returning the string "contest inactive" or something like that. I was thinking if we could turn that into these pages it would be nice.

As for the 404 page it does look cool :heart_eyes: but you'll need to accomodate ALL error codes and not just 404 since that template gets called for ALL errors