Cloud-CV / evalai-cli

:cloud: :rocket: Official EvalAI Command Line Tool
https://cli.eval.ai
BSD 3-Clause "New" or "Revised" License
55 stars 63 forks source link

Fix #106: Display error message while submitting when user doesn't participate in a challenge #258

Open hkmatsumoto opened 4 years ago

hkmatsumoto commented 4 years ago

Fix #106

The corresponding GCI task

Changes:

@vkartik97 @pushkalkatara Could you take a look? Thanks in advance!

hkmatsumoto commented 4 years ago

Brief explanation of the logic of this code lines: When a user submits to the challenges s/he doesn't participate using cli, these lines in EvalAI will be called and

{"error": "You haven't participated in the challenge"}

is returned with 403 status code.

Thus, to detect the error I check if the returned status code equals to 403, and if so print the ["error"] of the returned json which is "You haven't participated in the challenge", as you see in the json code above.

hkmatsumoto commented 4 years ago

Screencast: Screenshot from 2020-01-16 23-36-35

yashdusing commented 4 years ago

LGTM 👍

hkmatsumoto commented 4 years ago

@yashdusing Thanks! Can I also get my task approved?