-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix backend for create game #182
base: main
Are you sure you want to change the base?
Conversation
{ | ||
"cSpell.words": [ | ||
"colourblind", | ||
"gameplay", | ||
"passwordcheck", | ||
"Protanope", | ||
"rulebook", | ||
"tritanope", | ||
"xsss", | ||
"themer", | ||
"tritanope" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can get your wrapper to return a proper error message with stack trace as JSON, that would be awesome.
No description provided.