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

Add error handling for mysql and mysql2 server errors #92

Merged
merged 1 commit into from
Feb 13, 2017

Conversation

lvivier
Copy link
Contributor

@lvivier lvivier commented Feb 10, 2017

Summary

This PR maps server errors from the mysql and mysql2 drivers according to their sqlState property. A few notes/caveats:

  • Server errors only, client errors don't have a sqlState prop
  • I used SQLSTATE because the values are part of SQL92
  • I figure this means other SQL implementations probably expose these values (research needed)
  • I used the SQLite handler as a guide

@daffl
Copy link
Member

daffl commented Feb 13, 2017

Awesome, thank you!

@daffl daffl merged commit b36cee6 into feathersjs-ecosystem:master Feb 13, 2017
@lvivier
Copy link
Contributor Author

lvivier commented Feb 13, 2017

Woohoo! 👍

@lvivier lvivier deleted the mysql-errors branch February 13, 2017 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants