autolab / Tango

Standalone RESTful autograding service
http://www.autolabproject.com/
Apache License 2.0
48 stars 60 forks source link

Error codes should be documented #22

Closed icanb closed 9 years ago

icanb commented 9 years ago

It'd be great if developers connecting to Tango could understand the error codes returned from Tango. (e.g. -2)

icanb commented 9 years ago

What's up with this? Are they documented somewhere?

ymzong commented 9 years ago

Do you mean the error code that the front-end sees?

icanb commented 9 years ago

Yeah, that's what I meant. If we know these codes, we can also raise exceptions with human readable strings in your TangoClient module.

ymzong commented 9 years ago

Actually the error codes are determined at front-end, see: autograde.rb. What happens now is that when front-end encounters some exceptions (e.g. while reaching Tango, or reading files), different error codes would be returned (as job id). And, my recent pull request autolab/Autolab#405 added more error messages for the error codes.

I'm closing the issue here because front-end handles the error codes.

icanb commented 9 years ago

Oh I see. I thought those ids were sent from Tango.

mihirpandya commented 9 years ago

Yeah Tango always returns with a statusID and a corresponding statusMessage.