Fix backend for create game#182
Conversation
| { | ||
| "cSpell.words": [ | ||
| "colourblind", | ||
| "gameplay", | ||
| "passwordcheck", | ||
| "Protanope", | ||
| "rulebook", | ||
| "tritanope", | ||
| "xsss", | ||
| "themer", | ||
| "tritanope" | ||
| ] | ||
| } |
There was a problem hiding this comment.
I know you use VIM to code. In VS code it's possible to spell check (I'm sure in vim is possible too)
The settings.json can allow adding any local config for VS Code, in this case, all the words that the spell checker should exclude. You deleted it because it's a public repo?
There was a problem hiding this comment.
I also use vscode. But I use settings.json to encode my personal settings (e.g. type checking), so when I try to switch to your branch there's a conflict. Not sure how to resolve this but I don't think we need to check in your spellcheck settings?
| } catch(Exception $e) { | ||
| // return $this->JSONResponse( | ||
| // $e->getMessage(), | ||
| // '', | ||
| // false, | ||
| // $payload | ||
| // ); | ||
| throw new RequestException( | ||
| $this->JSONResponse('A gameID is required.', '', false, []) | ||
| ); |
There was a problem hiding this comment.
if you remove the try | catch, and if the API has an error, the error will not be returned in JSON format.
I use Insomnia to test my API endpoints, you can test with this endpoint.
Try changing the bet to 3, and the correct JSON error should be returned. With the change you made, an HTML error is returned.
There was a problem hiding this comment.
If you can get your wrapper to return a proper error message with stack trace as JSON, that would be awesome.

No description provided.