crobertsbmw / deckofcards

An API to simulate a deck of cards
MIT License
1.34k stars 335 forks source link

Error 500 when shuffling non-existent deck_id #91

Closed xsrpm closed 3 years ago

xsrpm commented 3 years ago

Hi, I love this API. I am testing it and I found that the api returns error 500 when a non-existent deck_id is passed to it, I suppose this could happen if a deck is deleted, but I forced the case by giving an id that did not exist. It seems to me that the api could give a more consistent error. Good job!

imagen

crobertsbmw commented 3 years ago

Thanks for bringing this to my attention. I actually was calling the method "deck_id_does_not_exist()", but I wasn't returning the response. An easy fix, I just needed to add "return deck_id_does_not_exist()". It should be online and working now!

On Wed, Nov 25, 2020 at 7:40 AM César Palma Morante < notifications@github.com> wrote:

Hi, I love this API. I am testing it and I found that the api returns error 500 when a non-existent deck_id is passed to it, I suppose this could happen if a deck is deleted, but I forced the case by giving an id that did not exist. It seems to me that the api could give a more consistent error. Good job!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crobertsbmw/deckofcards/issues/91, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMQLHVQKWKLDSSL5O2GW5LSRUJNJANCNFSM4UCPRIUQ .

xsrpm commented 3 years ago

imagen

Closed