codewars / codewars.com

Issue tracker for Codewars
https://www.codewars.com
BSD 2-Clause "Simplified" License
2.09k stars 219 forks source link

Issue with description-only Draft katas #994

Open kazk opened 7 years ago

kazk commented 7 years ago

By "description-only", I mean saved Draft kata without any solutions/tests defined. This type of kata has "languages": [].

curl -s https://www.codewars.com/api/v1/code-challenges/:id | jq .languages #=> []

These needs to be handled better so that users don't encounter errors like the following. (Same underlying issue, listing few ways that users might run into this.)

GET codewars.com/kata/:id => 500

image

/kata/:id returns 500 error ApplicationController::ResourceNotFoundError

image

POST codewars.com/kata/:id => 500

"Delete" seems to fail because of this: image image

Workaround is to add some simple solution/tests, save, and delete again.

GET codewars.com/kata/:id/train/:language => 500

image

/kata/:id/train/:language returns 500 error undefined method `supported_versions' for nil:NilClass

image

┆Issue is synchronized with this Clickup by Unito

Voileexperiments commented 7 years ago

I think this is related (a subset?) of #946.