diff --git a/CHANGELOG.md b/CHANGELOG.md index a814ac6ad2..4d517da6d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX +- [change] Update Sentry (@sentry/browser / @sentry/node) from v4.5.1 to v5.6.2 + [#1164](https://github.com/sharetribe/flex-template-web/pull/1164) - Update dependecies: all the easily updateable minor and batch updates: array.prototype.find, babel-jest, core-js, enzyme (et al.), express, helmet, inquirer, lodash, nodemon, raf, redux, source-map-support [#1163](https://github.com/sharetribe/flex-template-web/pull/1163) diff --git a/package.json b/package.json index 0c3d669564..e0be5244e4 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "license": "Apache-2.0", "dependencies": { "@mapbox/polyline": "^1.0.0", - "@sentry/browser": "4.5.1", - "@sentry/node": "4.5.1", + "@sentry/browser": "5.6.2", + "@sentry/node": "5.6.2", "array-includes": "^3.0.3", "array.prototype.find": "^2.0.4", "autosize": "^4.0.0", diff --git a/server/log.js b/server/log.js index 6e3bdea71f..4cca692dcb 100644 --- a/server/log.js +++ b/server/log.js @@ -51,6 +51,17 @@ exports.errorHandler = () => { } }; +const responseAPIErrors = error => { + return error && error.data && error.data.errors ? error.data.errors : []; +}; + +const responseApiErrorInfo = err => + responseAPIErrors(err).map(e => ({ + status: e.status, + code: e.code, + meta: e.meta, + })); + /** * Logs a error. If Sentry client is set up * passes the error to that. Otherwise prints diff --git a/yarn.lock b/yarn.lock index b79b8edefe..57252f0725 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1048,73 +1048,70 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@sentry/browser@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-4.5.1.tgz#a095f9636c3fd88f97086b6888c6f32f445c8fe8" - integrity sha512-sI/EGbKpHiBYcgVoJl3oxdCc8OpIL3SKjdSpgk7njBFdPJZbkbvi+N/iaJdm70dTeZAgKEmm8jiwNf845gzybQ== - dependencies: - "@sentry/core" "4.5.1" - "@sentry/types" "4.5.0" - "@sentry/utils" "4.5.1" +"@sentry/browser@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.6.2.tgz#f39e95c3aff2d4b4fd5d0d4aa7192af73f20d24e" + integrity sha512-Nm/W/5ra6+OQCWQkdd86vHjcYUjHCVqCzQyPasd6HE7SNlWe5euGVfFfDuUFsiDrMAG5uKfGYw5u/AqoweiQkQ== + dependencies: + "@sentry/core" "5.6.2" + "@sentry/types" "5.6.1" + "@sentry/utils" "5.6.1" tslib "^1.9.3" -"@sentry/core@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-4.5.1.tgz#bfc98a276974a670e25ca5873ba7ac078bf5410d" - integrity sha512-ml4Z1PZ7GjsJip5vYkRMkqCLpK5u3jxUYtECOWVsYHIHgVlvERV+HWCdyH0PoiEwr97ZU+4mjnc9Av8P7a18Mw== +"@sentry/core@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.6.2.tgz#8c5477654a83ebe41a72e86a79215deb5025e418" + integrity sha512-grbjvNmyxP5WSPR6UobN2q+Nss7Hvz+BClBT8QTr7VTEG5q89TwNddn6Ej3bGkaUVbct/GpVlI3XflWYDsnU6Q== dependencies: - "@sentry/hub" "4.5.1" - "@sentry/minimal" "4.5.1" - "@sentry/types" "4.5.0" - "@sentry/utils" "4.5.1" + "@sentry/hub" "5.6.1" + "@sentry/minimal" "5.6.1" + "@sentry/types" "5.6.1" + "@sentry/utils" "5.6.1" tslib "^1.9.3" -"@sentry/hub@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-4.5.1.tgz#979c0a826a9abfa567516b0da0e6f4017130def9" - integrity sha512-msftpMDSvWaENdYMHX8GPBQ5jTLxClWCprtAlE0AFZ90WHFrwvA0bHpGLzseFDjYwGUKoG2psxejoSstoBy53A== +"@sentry/hub@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.6.1.tgz#9f355c0abcc92327fbd10b9b939608aa4967bece" + integrity sha512-m+OhkIV5yTAL3R1+XfCwzUQka0UF/xG4py8sEfPXyYIcoOJ2ZTX+1kQJLy8QQJ4RzOBwZA+DzRKP0cgzPJ3+oQ== dependencies: - "@sentry/types" "4.5.0" - "@sentry/utils" "4.5.1" + "@sentry/types" "5.6.1" + "@sentry/utils" "5.6.1" tslib "^1.9.3" -"@sentry/minimal@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-4.5.1.tgz#a6128aab2a3967d8eb99afb3029057e1b4d9aaa5" - integrity sha512-/PaBrzuGkL6c137KRz5iIpmIfCj1FY/rYOffBAYrZADmmZyVrHfP2cNreneze+9OYy5dCFylBFEQpNOCMDdARw== +"@sentry/minimal@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.6.1.tgz#09d92b26de0b24555cd50c3c33ba4c3e566009a1" + integrity sha512-ercCKuBWHog6aS6SsJRuKhJwNdJ2oRQVWT2UAx1zqvsbHT9mSa8ZRjdPHYOtqY3DoXKk/pLUFW/fkmAnpdMqRw== dependencies: - "@sentry/hub" "4.5.1" - "@sentry/types" "4.5.0" + "@sentry/hub" "5.6.1" + "@sentry/types" "5.6.1" tslib "^1.9.3" -"@sentry/node@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-4.5.1.tgz#e8218b952695548d276274d2b6cc4f9d0676e063" - integrity sha512-qClDjSvRAAKnXkww5uiXQ+TySHjdmjr3c/scp4QxvjR9tNhYhdfimwdr4ZM6K9jhvK35vKVruuTVFzzSDukWHw== +"@sentry/node@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.6.2.tgz#4b62f056031da65cad78220d48c546b8bfbfaed7" + integrity sha512-A9CELco6SjF4zt8iS1pO3KdUVI2WVhtTGhSH6X04OVf2en1fimPR+Vs8YVY/04udwd7o+3mI6byT+rS9+/Qzow== dependencies: - "@sentry/core" "4.5.1" - "@sentry/hub" "4.5.1" - "@sentry/types" "4.5.0" - "@sentry/utils" "4.5.1" - "@types/stack-trace" "0.0.29" + "@sentry/core" "5.6.2" + "@sentry/hub" "5.6.1" + "@sentry/types" "5.6.1" + "@sentry/utils" "5.6.1" cookie "0.3.1" https-proxy-agent "2.2.1" lru_map "0.3.3" - lsmod "1.0.0" - stack-trace "0.0.10" tslib "^1.9.3" -"@sentry/types@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-4.5.0.tgz#59e2a27d48b01b44e8959aa5c8a30514fe1086a9" - integrity sha512-IstPjFoebQGrQWdM732D/+S0BTovmDgezyplk4kLEb87+/B+YK0hlhziUa7B2byTFJGgQQKXy7h2sKZBrA3GUA== +"@sentry/types@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.6.1.tgz#5915e1ee4b7a678da3ac260c356b1cb91139a299" + integrity sha512-Kub8TETefHpdhvtnDj3kKfhCj0u/xn3Zi2zIC7PB11NJHvvPXENx97tciz4roJGp7cLRCJsFqCg4tHXniqDSnQ== -"@sentry/utils@4.5.1": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-4.5.1.tgz#23f8a8fbe84e06d2546d3f1a72e30b34cbc2a3d8" - integrity sha512-ihzvgKBuvHBjKtbjz3EtuTW0OAJH5nw1L3tNVOCi+fbEdp10DiyL0i3hQKdE87CLoNEAt/SPRmTrG1cP2dNa7Q== +"@sentry/utils@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.6.1.tgz#69d9e151e50415bc91f2428e3bcca8beb9bc2815" + integrity sha512-rfgha+UsHW816GqlSRPlniKqAZylOmQWML2JsujoUP03nPu80zdN43DK9Poy/d9OxBxv0gd5K2n+bFdM2kqLQQ== dependencies: - "@sentry/types" "4.5.0" + "@sentry/types" "5.6.1" tslib "^1.9.3" "@svgr/babel-plugin-add-jsx-attribute@^4.2.0": @@ -1283,11 +1280,6 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== -"@types/stack-trace@0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/stack-trace/-/stack-trace-0.0.29.tgz#eb7a7c60098edb35630ed900742a5ecb20cfcb4d" - integrity sha512-TgfOX+mGY/NyNxJLIbDWrO9DjGoVSW9+aB8H2yy1fy32jsvxijhmyJI9fDFgvz3YP4lvJaq9DzdR/M1bOgVc9g== - "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -6762,11 +6754,6 @@ lru_map@0.3.3: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= -lsmod@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lsmod/-/lsmod-1.0.0.tgz#9a00f76dca36eb23fa05350afe1b585d4299e64b" - integrity sha1-mgD3bco26yP6BTUK/htYXUKZ5ks= - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -10255,11 +10242,6 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -stack-trace@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" - integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= - stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"