Skip to content

Add error handling for mysql and mysql2 server errors - #92

Merged
daffl merged 1 commit into
feathersjs:masterfrom
lvivier:mysql-errors
Feb 13, 2017
Merged

daffl merged 1 commit into
feathersjs:masterfrom
lvivier:mysql-errors

Conversation

@lvivier

@lvivier lvivier commented Feb 10, 2017

Copy link
Copy Markdown
Contributor

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

daffl commented Feb 13, 2017

Copy link
Copy Markdown
Member

Awesome, thank you!

@daffl
daffl merged commit b36cee6 into feathersjs:master Feb 13, 2017
@lvivier

lvivier commented Feb 13, 2017

Copy link
Copy Markdown
Contributor Author

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