Skip to content
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
merged 1 commit into from
Apr 19, 2017

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Apr 19, 2017

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:

  • Run your code through ESLint. Check out our styleguide.
  • Run integration tests.
  • Run end-to-end tests.
  • Accurately described the changes your are making in this pull request.

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!

@@ -66,10 +67,14 @@ exports.handler = function handler(error, req, res, next) {
key = SQL_STATES[error.sqlState];
Copy link
Collaborator Author

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
Copy link
Collaborator Author

jniles commented Apr 19, 2017

@kwilu r+

@ghost
Copy link

ghost commented Apr 19, 2017

📌 Commit fad194b has been approved by jniles

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
Copy link
Collaborator Author

jniles commented Apr 19, 2017

@kwilu r+

@ghost
Copy link

ghost commented Apr 19, 2017

📌 Commit 0744e40 has been approved by jniles

@ghost
Copy link

ghost commented Apr 19, 2017

⌛ Testing commit 0744e40 with merge 356ae1f...

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!
@jniles jniles merged commit d27d615 into IMA-WorldHealth:master Apr 19, 2017
@jniles jniles deleted the fix-verbose-server-errors branch April 19, 2017 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant