-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat(server): verbose MySQL errors #1521
Merged
jniles
merged 1 commit into
IMA-WorldHealth:master
from
jniles:fix-verbose-server-errors
Apr 19, 2017
Merged
feat(server): verbose MySQL errors #1521
jniles
merged 1 commit into
IMA-WorldHealth:master
from
jniles:fix-verbose-server-errors
Apr 19, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jniles
commented
Apr 19, 2017
server/config/interceptors.js
Outdated
@@ -66,10 +67,14 @@ exports.handler = function handler(error, req, res, next) { | |||
key = SQL_STATES[error.sqlState]; |
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.
Whoops, this doesn't address the problem. If the key doesn't exist, the sqlState
should be sent back to the client :'(
jniles
force-pushed
the
fix-verbose-server-errors
branch
from
April 19, 2017 10:56
ddc7282
to
fad194b
Compare
@kwilu r+ |
📌 Commit fad194b has been approved by |
Previous versions of BHIMA avoided showing errors to the client, resulting in a large red bar with no context. This commit makes sure that we can at least echo the errors, as well as making sure the client sees something .. the raw MySQL error. This will help super users inform us what kind of errors they are seeing in the meantime. Additionally, it groups all tests under a new `test.sh` script so that the "Ctrl-C" interrupt works on unix-based systems to halt the tests.
jniles
force-pushed
the
fix-verbose-server-errors
branch
from
April 19, 2017 11:19
fad194b
to
0744e40
Compare
@kwilu r+ |
📌 Commit 0744e40 has been approved by |
ghost
pushed a commit
that referenced
this pull request
Apr 19, 2017
feat(server): verbose MySQL errors Previous versions of BHIMA avoided showing errors to the client, resulting in a large red bar with no context. This commit makes sure that we can at least echo the errors, as well as making sure the client sees something .. the raw MySQL error. This will help super users inform us what kind of errors they are seeing in the meantime. Additionally, it groups all tests under a new `test.sh` script so that the "Ctrl-C" interrupt works on unix-based systems to halt the tests. ----- Thank you for contributing! Before submitting this pull request, please verify that you have: - [x] Run your code through ESLint. [Check out our styleguide](https://github.com/IMA-WorldHealth/bhima-2.X/blob/master/docs/STYLEGUIDE.md). - [x] Run integration tests. - [x] Run end-to-end tests. - [x] Accurately described the changes your are making in this pull request. For a more detailed checklist, [see the official review checklist](https://docs.google.com/document/d/1nupLVLRXgSZJQo_acLgrwvPnN8RukfSiwRhSToj81uU/pub) that this PR will be evaluated against. Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous versions of BHIMA avoided showing errors to the client,
resulting in a large red bar with no context. This commit makes sure
that we can at least echo the errors, as well as making sure the client
sees something .. the raw MySQL error. This will help super users
inform us what kind of errors they are seeing in the meantime.
Additionally, it groups all tests under a new
test.sh
script so thatthe "Ctrl-C" interrupt works on unix-based systems to halt the tests.
Thank you for contributing!
Before submitting this pull request, please verify that you have:
For a more detailed checklist, see the official review checklist that this PR will be evaluated against.
Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!