mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
9a8c703e34
refs TryGhost/Product#4083 - In the vast majority of cases, we shouldn't have SQL errors in our code. Due to some limitations with validating e.g. nql filters passed to the API, sometimes we don't catch these errors and they bubble up to the user. - In these rare cases, Ghost was returning the raw SQL error from mysql which is not very user friendly and also exposes information about the database, which generally is not a good practice. - To make things worse, Sentry was treating every instance of these errors as a unique issue, even when it was exactly the same query failing over and over. - This change improves the error message returned from the API, and also makes sure that Sentry will group all these errors together, so we can easily see how many times they are happening and where. - It also adds more specific context to the event that is sent to Sentry, including the mysql error number, code, and the SQL query itself. |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json |